You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2010/01/04 19:31:43 UTC

[jira] Commented: (WW-3363) Custom struts.multipart.parser is ignored as of 2.1.8

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

Wes Wannemacher commented on WW-3363:
-------------------------------------

Yea, that was a change added to 2.1.8. I think that all that you need to to is the following - 

(create a bean that implements the MultiPartRequest interface and configure it -)

<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest" name="upload-plugin"
	          class="org.apache.struts2.fileupload.EnhancedJakartaMultiPartRequest"/>

(change the constant so that the dispatcher uses your bean -)

<constant name="struts.multipart.handler" value="upload-plugin"/>

I am going to change this bug so that it reflects that we need documentation.

> Custom struts.multipart.parser is ignored as of 2.1.8
> -----------------------------------------------------
>
>                 Key: WW-3363
>                 URL: https://issues.apache.org/struts/browse/WW-3363
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.8
>            Reporter: Lauri Lehtinen
>
> This issue appears when I update my struts2 dependency from 2.1.6 to 2.1.8, and disappears when reverting. Here are some facts I've gathered so far:
> In my struts.xml:
> <constant name="struts.multipart.parser" value="com.systemout.pdf.webapp.base.multipart.MonitoredMultiPartRequest" />
> Tomcat startup:
> ...
> 09-12-31 13:36:54 DEBUG org.apache.struts2.config.BeanSelectionProvider - Choosing bean (class com.systemout.pdf.webapp.base.multipart.MonitoredMultiPartRequest) for interface org.apache.struts2.dispatcher.multipart.MultiPartRequest
> ...
> On file upload, debugging in org.apache.struts2.dispatcher.Dispatcher.java, after line 697 has been executed, multiNames contains: [default, jakarta, struts] and multipartHandlerName is set to "jakarta"
> My custom MonitoredMultiPartRequest is never instantiated, instead, JakartaMultiPartRequest is used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.