[ 
https://issues.apache.org/jira/browse/WW-4610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177550#comment-15177550
 ] 

Filippo Munafò commented on WW-4610:
------------------------------------

Hi victorsosa,
you are right, ServletActionContext.getRequest() returns a HttpServletRequest.
But debugging the code in the same method, for example 
org.apache.struts.action.RequestProcessorprocess(HttpServletRequest request, 
HttpServletResponse response), request is an instance of 
MultiPartRequestWrapper while ServletActionContext.getRequest() return an 
instance of org.apache.catalina.connector.RequestFacade.
As I wrote, we are using StrutsPrepareFilter, not StrutsExecuteFilter and not 
StrutsPrepareAndExecuteFilter, because it's a Struts1 app that we are carefully 
migrating to struts2.

Filippo

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-4610
>                 URL: https://issues.apache.org/jira/browse/WW-4610
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.24, 2.5
>            Reporter: Filippo Munafò
>             Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to