Hi all, Where I can catch the org.apache.struts.upload.MaxLengthExceededException thrown when the file size exceeds in Struts 1.0. I need to a message and redirect user to the previous page. I can catch it in web.xml which catches the exception. But it seems not to be an elegant solution. I want to catch it somewhere in the code and log information about the user. This is the stack trace.
2004-08-23 10:10:43 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: Problem while reading request: The maximum length of 1 bytes has been exceeded at org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja va:323) at org.apache.struts.upload.MultipartIterator.<init>(MultipartIterator.java:152 ) at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti partRequestHandler.java:65) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) 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) ---------------- ---------------- ----- Root Cause ----- org.apache.struts.upload.MaxLengthExceededException: The maximum length of 1 bytes has been exceeded at org.apache.struts.upload.BufferedMultipartInputStream.<init>(BufferedMultipa rtInputStream.java:86) at org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.ja va:312) at org.apache.struts.upload.MultipartIterator.<init>(MultipartIterator.java:152 ) at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti partRequestHandler.java:65) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) 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) ---------------- ---------------- rgds Antony Paul --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]