[Building Sakai] Empty response after exception in RequestFilter

Daniel Merino daniel.merino at unavarra.es
Tue Jan 21 05:34:45 PST 2014


Hi everybody.

I am currently working to implement folder uploads through Drag & Drop. 
I have it working, but I am getting stuck in the little details.

For example: if a folder is uploaded in a not valid browser, 
RequestFilter throws an exception:

2014-01-20 14:53:26,212  INFO http-bio-8081-exec-5 
org.sakaiproject.util.RequestFilter - Unexpected exception in upload parsing
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: 
Processing of multipart/form-data request failed. Stream ended unexpectedly
     at 
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:371)
     at 
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
     at 
org.sakaiproject.util.RequestFilter.handleFileUpload(RequestFilter.java:1089)
     at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:625)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

and the response sent from server is empty, no matter if after the 
exception I use sendError or setStatus methods to overwrite it in 
ResourcesHelperAction class.

I need to change the response to show a proper error message to users. 
Does anybody know if it is possible to modify the response code without 
touching RequestFilter?

Thanks in advance.
Best regards.
-- 
Daniel Merino Echeverría
daniel.merino at unavarra.es
Gestor de teleformación - Centro Superior de Innovación Educativa.
Tfno: 948-168489 - Universidad Pública de Navarra.


More information about the sakai-dev mailing list