Forums Register Login

Exception while uploading a zip file on Linux OS

+Pie Number of slices to send: Send
Hi All,

I am getting an exception of

java.lang.IndexOutOfBoundsException
java.io.FileOutputStream.writeBytes(Native Method)
java.io.FileOutputStream.write(FileOutputStream.java:260)
com.aem.upload.ZipFileUploadServlet.processRequest(ZipFileUploadServlet.java:91)
com.aem.upload.ZipFileUploadServlet.doPost(ZipFileUploadServlet.java:115)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

when I try uploading a ZIP file through my application running on Linux OS but the same is running fine on Windows OS (without any exception and uploading perfectly) kindly let me know where the code is wrong or I need to make some changes accordingly while making this run perfectly on Linux OS

Here's my Servlet code for uploading the Zip file:

ZipFileUploadServlet.java


index.jsp


Thank you in Advance
+Pie Number of slices to send: Send
There seems to be the problem with the length argument (endPos - startPos) of write(). As the exception clearly suggests, the code is trying to access the memory location outside the already-rigidly-assigned space.
+Pie Number of slices to send: Send
Oh no, not again that roseindia.net ripoff.

Please read my answer in this topic: https://coderanch.com/t/414105/Servlets/java/Upload-Download-File
eat bricks! HA! And here's another one! And a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3467 times.
Similar Threads
JSP Page For Uploading a File to Destination Folder
Large File Size Upload Problem
Uploading file path in properties file
moving files over the network
request cannot be resolved. any imports missing??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:11:00.