Hot dang Steve!  Thanks!  I have a feeling you've saved me a ton of
frustration.  This really should be documented somewhere. . .

Brice

On Wed, Jan 27, 2010 at 3:00 PM, Stephen Ince <stephenpi...@gmail.com>wrote:

> Brice,
>   I went through a similiar issue. Here is how I resolved it. I spent
> days on it. You have do it via a plugin. This is not documented any
> where.
>
> create a plugin. e.g fileupload.jar and put in under WEB-INF/lib
> The jar file should have the classes and a struts-plugin.xml file.
>
> struts-plugin.xml show have a reference to your parser.
> e.g.
> <struts>
>    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
> name="jakartax"
> class="com.loadgeneral.struts2.JakartaMultiPartRequestx"
> scope="default" />
>
>
> The following may not be necessary.
> Struts.xml
> ----------------------------------------------------------------
> <struts>
>    <constant name="struts.devMode" value="false" />
>    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
> name="jakartax"
> class="com.loadgeneral.struts2.JakartaMultiPartRequestx"
> scope="default" />
>    <constant name="struts.multipart.handler" value="jakartax" />
>
>
>
> Steve
> On Wed, Jan 27, 2010 at 4:03 PM, Brice Roncace <brice.ronc...@gmail.com>
> wrote:
> > I'm trying to use a custom implementation of the
> > org.apache.struts2.dispatcher.multipart.MultiPartRequest interface, but
> even
> > after changing the appropriate struts2 constant value I still end up with
> > the default JakartaMultiPartRequest.
> >
> > Here's the change I've made to my struts.xml file:
> >
> > {code}
> > <constant name="struts.multipart.parser"
> > value="test.MyCustomMultiPartRequest"/>
> > {code}
> >
> > Struts gives me this debug statement:
> >
> > {quote}
> > Choosing bean (test.MyCustomMultiPartRequest) for interface
> > org.apache.struts2.dispatcher.multipart.MultiPartRequest to be loaded
> from
> > the ObjectFactory
> > {quote}
> >
> > I am using object factory 'spring'.  And I did try defining a spring bean
> > for my MyCustomMultiPartRequest object and using just the bean name in
> the
> > constant value attribute above, but no luck.
> >
> > Can anybody help me out?
> >
> > Thanks,
> > Brice
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to