its feasible to define your web-app Configuration? 
1- apache commons fileupload
2- myfaces.webapp.filter
3- clay 
4- irx.view 
and so on...
did you check the <param-name>uploadMaxFileSize</param-name>??

Sam

AM101 wrote:
> 
> I have configured my application to use FileUpload functionality. It is
> working as per design. But if I upload a file whose size is bigger than
> configured size, application throws following exception in the backend. is
> there any way,  I can report the user that he has to upload a file whose
> size is less than configured size.
> 
> INFO: user tried to upload a file that exceeded file-size limitations.
> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
> the request was rejected because its size (387257) exceeds the configured
> maximum (5120)
>       at
> org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:797)
>       at
> org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:323)
>       at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:341)
>       at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302)
>       at
> org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:82)
>       at
> org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:163)
>       at
> org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39)
>       at
> org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87)
>       at
> org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:183)
>       at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:241)
>       at
> org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:283)
>       at
> org.apache.shale.clay.faces.ClayViewHandler.restoreView(ClayViewHandler.java:286)
>       at
> org.apache.shale.validator.faces.ValidatorViewHandler.restoreView(ValidatorViewHandler.java:136)
>       at
> org.apache.shale.view.faces.ViewViewHandler.restoreView(ViewViewHandler.java:160)
>       at
> com.irx.view.handler.CustomViewHandler.restoreView(CustomViewHandler.java:58)
>       at
> org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
>       at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>       at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>       at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>       at
> org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)
>       at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>       at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>       at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>       at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>       at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>       at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>       at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>       at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>       at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>       at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>       at java.lang.Thread.run(Unknown Source)
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-notify-user-about-FileUploadBase%24SizeLimitExceededException-tp15396013p15407659.html
Sent from the Shale - User mailing list archive at Nabble.com.

Reply via email to