You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/05/15 18:56:24 UTC
DO NOT REPLY [Bug 9117] New: -
DiskMultipartRequestHandler Bug
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: struts-dev@jakarta.apache.org
ReportedBy: flyguy@null.net
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>