struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Munafò <>
Subject MultiPartRequestWrapper
Date Tue, 23 Feb 2016 11:46:56 GMT
we are trying to migrate a big webapp (a thousand pages) from struts1 to
One of the first step was to introduce the StrutsPreparefilter, leaving
everything served by the ActionServlet.
Then we removed the objects request and response from every action's
methods signature, leaving them managed only in action ancestor class.
Talking about multipart request, we extended JakartaMultiPartRequest to
override the parse method in order to leave request parsed by our code.
Now we would like to leave request parse made by JakartaMultiPartRequest,
removing the override, but we need access to the fileitems uploaded by
users. In other words, our action ancestor class needs to get access to
the "files" properties of JakartaMultiPartRequest through the
MultiPartRequestWrapper. Otherwise we need to code something similar to
what is done by the FileUploadInterceptor.intercept and create againg the
fileitem needed by our application code.

The request is: can you change the MultiPartRequestWrapper, and the
JakartaMultiPartRequest, adding a public getFileItems(String) method?

Another question: in Dispatcher.wrapRequest there is no update of request
in context, so a ServletActionContext.getRequest() never return the
MultiPartRequestWrapper (or StrutsRequestWrapper). Why?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message