You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephen Ince <st...@gmail.com> on 2010/01/13 05:14:17 UTC

where to set 'struts.multipart.parser' property in struts2?

Hi,
  I am using struts2 version 2.1.8.1 and I am trying to set the
struts.multipart.parser property. I can't seem to set it. I have tried
every where, one place at a time.
This is what I have tried.

WEB-INF/classes/struts.xml
    <constant name="struts.multipart.parser"
value="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
/>

WEB-INF/classes/struts.properties
    struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx

WEB-INF/classes/loadgeneral.xml <!-- my app config file -->
                <interceptor-ref name="fileUpload">
                    <param name="maximumSize">10240</param>
                    <param
name="parser">org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx</param>
                    <param name="saveDir">/.deleted</param>
                </interceptor-ref>

I have also tried setting 'struts.multipart.saveDir' but that is not
being set either.
I am getting the follwing warning:
INFO: Unable to find 'struts.multipart.saveDir' property setting. Defaulting to
javax.servlet.context.tempdir

Question:
  Does any have an idea of what could be the problem or where I should
set the 'struts.multipart.parser' property?
  Any help would be greatly appreciated?

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: where to set 'struts.multipart.parser' property in struts2?

Posted by Stephen Ince <st...@gmail.com>.
Lukasz,
  Sorry for getting back to this late. I was out of town. Yes it
exists.  I am basically using a JakartaMultiPartRequest class that
someone modified and added an UploadProgressListener listener hooks.
I instantiated the class to verify.

Steve


On Thu, Jan 14, 2010 at 2:01 AM, Lukasz Lenart
<lu...@googlemail.com> wrote:
> 2010/1/13 Stephen Ince <st...@gmail.com>:
>>    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
>> name="jakartax"
>> class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
>> scope="default"/>
>>    <constant name="struts.multipart.parser" value="jakartax" />
>
> Is that class exists
> org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx ?
>
>
> Regards
> --
> Lukasz
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: where to set 'struts.multipart.parser' property in struts2?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/1/13 Stephen Ince <st...@gmail.com>:
>    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
> name="jakartax"
> class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
> scope="default"/>
>    <constant name="struts.multipart.parser" value="jakartax" />

Is that class exists
org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx ?


Regards
-- 
Lukasz
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: where to set 'struts.multipart.parser' property in struts2?

Posted by Stephen Ince <st...@gmail.com>.
Lukasz,
   Thx for your replay. I defined the jakartax bean but it is still
not working. Does anyone know how I can further troubleshoot this?  I
can not set 'struts.multipart.saveDir' setting either. It's sees my
application include but for some reason the "struts.multipart.parser"
is not being set.
Here is my configuration. Any help would be greatly appreciated.

Steve

WEB-INF/classes/struts.xml

    <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
name="jakartax"
class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
scope="default"/>
    <constant name="struts.multipart.parser" value="jakartax" />

    <constant name="struts.devMode" value="false" />
    <include file="loadgeneral.xml"/>


On Wed, Jan 13, 2010 at 2:16 AM, Lukasz Lenart
<lu...@googlemail.com> wrote:
> 2010/1/13 Stephen Ince <st...@gmail.com>:
>> WEB-INF/classes/struts.xml
>>    <constant name="struts.multipart.parser"
>> value="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
>> />
>
> Take a look on struts-default.xml, you have to define bean and then constant
>
> <bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
> name="jakarta" class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest"
> scope="default" />
>
> <constant name="struts.multipart.handler" value="jakarta" />
>
>
> Regards
> --
> Lukasz
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: where to set 'struts.multipart.parser' property in struts2?

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/1/13 Stephen Ince <st...@gmail.com>:
> WEB-INF/classes/struts.xml
>    <constant name="struts.multipart.parser"
> value="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequestx"
> />

Take a look on struts-default.xml, you have to define bean and then constant

<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
name="jakarta" class="org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest"
scope="default" />

<constant name="struts.multipart.handler" value="jakarta" />


Regards
-- 
Lukasz
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org