[Building Sakai] Empty response after exception in RequestFilter

Steve Swinsburg steve.swinsburg at gmail.com
Tue Jan 21 15:18:53 PST 2014


Hi Daniel,

You might want to disable the RequestFilter from parsing file uploads This
needs to be done for some frameworks that handle their own uploads (like
Wicket) otherwise the RF eats them. In your web.xml RF declaration:

<init-param>
	<param-name>upload.enabled</param-name>
	<param-value>false</param-value>
</init-param>



On Wed, Jan 22, 2014 at 12:34 AM, Daniel Merino
<daniel.merino at unavarra.es>wrote:

> 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.
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140122/33d2c3d4/attachment.html 


More information about the sakai-dev mailing list