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=9117>.
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=9117

DiskMultipartRequestHandler Bug

           Summary: DiskMultipartRequestHandler Bug
           Product: Struts
           Version: 1.0 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: File Upload
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


There appear to be several problems with this class.  

if setServlet is not invoked then a null pointer exception will be thrown within
the handleRequest method on the call to retrieve tempdir, specifically this line:

//attempt to retrieve the servlet container's temporary directory
        ServletContext context = servlet.getServletConfig().getServletContext();

There is no servlet since we didn't call setServlet servlet.getServletConfig()
returns null and then calling getServletContext() on a null results in the null
pointer exception.

The above line should be included in the try/catch block then this class would
work as advertised.

Another suggestion would be to include a constructor that would take the
actionservlet.  This is more clear than just having a set method within the class.

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

Reply via email to