DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9115

org.apache.struts.upload.MultipartIterator not correctly getting tempDir 

           Summary: org.apache.struts.upload.MultipartIterator not correctly
                    getting tempDir
           Product: Struts
           Version: 1.0 Final
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: File Upload
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The temporary directory passed to the ActionServlet as an initialization 
parameter (<init-param>tempDir</init-param>) is somehow not passed to the 
tempDir of the MultipartIterator class. I inserted a System.out.println
(tempDir); statement in the createLocalFile method of MultipartIterator and the 
string value output is different from the param-value of the tempDir parameter.
On Linux I then get the following error:
java.lang.SecurityException: Unable to create temporary file at 
java.io.File.checkAndCreate(File.java:1158) at java.io.File.createTempFile
(File.java:1246) at org.apache.struts.upload.MultipartIterator.createLocalFile
(MultipartIterator.java:485) at 
org.apache.struts.upload.MultipartIterator.getNextElement
(MultipartIterator.java:217) at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest
(DiskMultipartRequestHandler.java:76) at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735) at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to