Re: Filtering multipart content

2007-04-06 Thread Chris Pratt
Looks like you need a MultipartFilter earlier in the Filter Chain than your Filter. That way both your Filter and the Action will get the results. It will bypass Strut's built-in Multipart support, but it should work fine. (I think com.oreilly.servlets has one) (*Chris*) On 3/27/07, Lance <[E

Re: Filtering multipart content

2007-03-27 Thread Lance
My filter is only interested in text parameters, my struts action processes the file parameter. If I parse the request myself (in the filter), the file parameter does not make it through to my action. If I do not parse the request myself, I can not see the parameters in my filter. Hope this cl

Re: Filtering multipart content

2007-03-26 Thread trad-ex
Hi Lance, Sorry for my misunderstanding your issue. What I understood is: Your Filter class works fine except file parameter. Is this correct ? So, after I looked over your implementation, I found the line below: parameterMap = multipartHandler.getTextElements(); So, parameterMap has

Re: Filtering multipart content

2007-03-26 Thread Lance
Hi trad-ex, In action code, the ActionServlet has already parsed the request for you so request.getParameterMap() magically works. In a filter scenario, the request has not yet been parsed. I have since abondened attempting to filter multipart requests in my filter. Luckily most of our actions

Re: Filtering multipart content

2007-03-26 Thread trad-ex
Hi Lance, Just curious, I implemented multipart request handler using Struts 1.2, ActionForm and Actoin class ( not using Fileter...) . like: protected ActionForward executeAction( ActionMapping mapping , ActionForm form , HttpServletRequest request ,

Filtering multipart content

2007-03-22 Thread Lance
Can someone tell me the best way to deal with multipart parameters in a Filter without affecting struts? In my filter, request.getParameterMap() returns an empty map because the multipart content has not yet been parsed. I had a look in the struts code and saw references to a MultipartRequestW