-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
I have used below code to fileupload demo.
<zk>
<window title="upload" border="normal">
<button label="Upload Image" upload="true,maxsize=300">
<attribute name="onUpload"><![CDATA[
org.zkoss.util.media.Media media = event.getMedia();
if (media instanceof org.zkoss.image.Image) {
org.zkoss.zul.Image image = new org.zkoss.zul.Image();
image.setContent(media);
image.setParent(pics);
} else {
Messagebox.show("Not an image: " + media, "Error", Messagebox.OK,
Messagebox.ERROR);
break;
}
]]></attribute>
</button>
<separator ></separator>
<vlayout id="pics" height="360px" style="overflow:auto" ></vlayout>
</window>
</zk>
With this simple demo fileupload code, I am still getting "The server is temporarily out of service." error when I select file from popup window.
Kindly help me to resolve this issue as it is very much urgent for me to resolve this issue.
Thank you in advance.
when you build your java .war file of your zk app, try adding the <zk path>/dist/lib/ext/commons-fileupload.jar and <zk path>/dist/lib/ext/commons-io.jar to your .war file... i don't know why, but i got exactly the same problem as you and now the problem is no more.
It is not a ZK problem, but a Glassfish 3.1.2 problem ! We searched the web and there are related problems.
There is workaround/fix until the next service release of Glassfish. Replace the web-core.jar file. It worked for us.
Asked: 2012-05-07 11:56:34 +0800
Seen: 284 times
Last updated: May 29 '12