Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
lwolfe63  
#1 Posted : Monday, November 3, 2008 2:39:47 AM(UTC)
lwolfe63

Rank: Newbie

Groups: Member
Joined: 10/13/2008(UTC)
Posts: 1

Hi - I am trying to get the basic JSP server side sample code to work on my server. I have commons-fileupload version 1.2.1. Is that the right version? I am getting the following error message:

Thank you for any help you could give me.

HTTP Status 500 -



type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /upload.jsp at line 76

73: fu.setRepositoryPath(absTempPath);
74:
75: //Get uploaded files.
76: List listFileItems = fu.parseRequest(request);
77:
78: //Put them in hash table for fast access.
79: Hashtable fileItems = new Hashtable();


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. /home/greenhotelfinder.net/httpdocs/Gallery/Temp/upload__7e0d318b_11d623a4f22__7ffe_00000089.tmp (Permission denied)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.upload_jsp._jspService(upload_jsp.java:187)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. /home/greenhotelfinder.net/httpdocs/Gallery/Temp/upload__7e0d318b_11d623a4f22__7ffe_00000089.tmp (Permission denied)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:310)
org.apache.jsp.upload_jsp._jspService(upload_jsp.java:138)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.io.FileNotFoundException: /home/greenhotelfinder.net/httpdocs/Gallery/Temp/upload__7e0d318b_11d623a4f22__7ffe_00000089.tmp (Permission denied)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:179)
java.io.FileOutputStream.<init>(FileOutputStream.java:131)
org.apache.commons.io.output.DeferredFileOutputStream.thresholdReached(DeferredFileOutputStream.java:122)
org.apache.commons.io.output.ThresholdingOutputStream.checkThreshold(ThresholdingOutputStream.java:221)
org.apache.commons.io.output.ThresholdingOutputStream.write(ThresholdingOutputStream.java:128)
org.apache.commons.fileupload.util.Streams.copy(Streams.java:101)
org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:310)
org.apache.jsp.upload_jsp._jspService(upload_jsp.java:138)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0-snapshot logs.




Apache Tomcat/6.0-snapshot
File Attachment(s):
upload.jsp (5kb) downloaded 60 time(s).
Dmitry  
#2 Posted : Tuesday, November 4, 2008 5:32:03 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

The JSP samples provided with Image Uploader use Jakarta common file upload to handle form-based file upload. You need to have it installed on your server.

The following links will help you to understand basic concepts:
Handling Form-based File Upload with Java Servlet or JSP
JavaServer Pages (JSP) and JSTL - How to upload an image in jsp page
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.