You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kiran Badi <ki...@poonam.org> on 2015/06/24 01:22:51 UTC

Commons Apache Fileupload from Classic web app and Struts 2 Integration

Hi All,

I was using Apache FileUpload 1.2 for my classic web app based on
jsp/servlets and now I have integrated Struts 2.3.20 with this application.

For some reason after adding S2 with my classic app, its breaking file
upload functionality which was working fine earlier.Nothing shows up in
logs other than that all parameters values goes as null.

After doing some analysis I see that S2 ships with file upload jar , along
with bunch commons jars. Does S2 file upload jars has any conflict with
classic file uploads like probably file upload interceptor of S2
intercepting earlier functionality etc.

Any thoughts please.

- Kiran

Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Kiran Badi <ki...@poonam.org>.
haha got it Lukasz.Thanks.

On Thu, Jun 25, 2015 at 1:02 AM, Lukasz Lenart <lu...@apache.org>
wrote:

> 2015-06-25 5:25 GMT+02:00 Kiran Badi <ki...@poonam.org>:
> > ok Lukasz,Thanks
> >
> >  I think its exclude pattern which was required here
> >
> > I am using <constant name="struts.action.excludePattern" value="URL1.do,
> > URL2.DO"/>
>
> It's a pattern, regex so you must escape "." like this
> "URL1\\.do,URL2\\.do"
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Lukasz Lenart <lu...@apache.org>.
2015-06-25 5:25 GMT+02:00 Kiran Badi <ki...@poonam.org>:
> ok Lukasz,Thanks
>
>  I think its exclude pattern which was required here
>
> I am using <constant name="struts.action.excludePattern" value="URL1.do,
> URL2.DO"/>

It's a pattern, regex so you must escape "." like this "URL1\\.do,URL2\\.do"


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Kiran Badi <ki...@poonam.org>.
ok Lukasz,Thanks

 I think its exclude pattern which was required here

I am using <constant name="struts.action.excludePattern" value="URL1.do,
URL2.DO"/>

however for URL2.do I still have issues.Files still go as null.

Not sure what is the issue, but I think I need to spend some time on that
now.

Do you think pattern is right for 2 urls, I have close to 10 url's which
probably I need to exclude.

- Kiran

On Wed, Jun 24, 2015 at 12:59 AM, Lukasz Lenart <lu...@apache.org>
wrote:

> Please do not cross post to many lists.
>
> 2015-06-24 1:22 GMT+02:00 Kiran Badi <ki...@poonam.org>:
> > Hi All,
> >
> > I was using Apache FileUpload 1.2 for my classic web app based on
> > jsp/servlets and now I have integrated Struts 2.3.20 with this
> application.
> >
> > For some reason after adding S2 with my classic app, its breaking file
> > upload functionality which was working fine earlier.Nothing shows up in
> > logs other than that all parameters values goes as null.
> >
> > After doing some analysis I see that S2 ships with file upload jar ,
> along
> > with bunch commons jars. Does S2 file upload jars has any conflict with
> > classic file uploads like probably file upload interceptor of S2
> > intercepting earlier functionality etc.
>
> How did you integrate Struts? Do you use /* as a pattern for the
> filter? If so you may consider excluding some urls
> http://stackoverflow.com/a/8192169/1805267
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Lukasz Lenart <lu...@apache.org>.
Please do not cross post to many lists.

2015-06-24 1:22 GMT+02:00 Kiran Badi <ki...@poonam.org>:
> Hi All,
>
> I was using Apache FileUpload 1.2 for my classic web app based on
> jsp/servlets and now I have integrated Struts 2.3.20 with this application.
>
> For some reason after adding S2 with my classic app, its breaking file
> upload functionality which was working fine earlier.Nothing shows up in
> logs other than that all parameters values goes as null.
>
> After doing some analysis I see that S2 ships with file upload jar , along
> with bunch commons jars. Does S2 file upload jars has any conflict with
> classic file uploads like probably file upload interceptor of S2
> intercepting earlier functionality etc.

How did you integrate Struts? Do you use /* as a pattern for the
filter? If so you may consider excluding some urls
http://stackoverflow.com/a/8192169/1805267


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Kiran Badi <ki...@poonam.org>.
Hi Benedikt,

I am on 1.3.1 and struts dependencies wrt to file upload is

https://struts.apache.org/docs/file-upload.html#FileUpload-Dependencies

I recently upgraded to 1.3.1 and my issue was with struts 2 playing
mischief(I think fileupload interceptor was issue) and now it's fixed and
working good.

I have  many libraries from apache and most of those libraries ships same
jars again and again.Recent issue was with struts 2.

I have removed all jars and hopefully I believe strut 2.3.20 should not
have any issues with 1.3.1 though they still recommend 1.2.2

- Kiran



On Wed, Jun 24, 2015 at 4:10 AM, Benedikt Ritter <br...@apache.org> wrote:

> Hello Kiran,
>
> 2015-06-24 1:22 GMT+02:00 Kiran Badi <ki...@poonam.org>:
>
> > Hi All,
> >
> > I was using Apache FileUpload 1.2 for my classic web app based on
> > jsp/servlets and now I have integrated Struts 2.3.20 with this
> application.
> >
> > For some reason after adding S2 with my classic app, its breaking file
> > upload functionality which was working fine earlier.Nothing shows up in
> > logs other than that all parameters values goes as null.
> >
> > After doing some analysis I see that S2 ships with file upload jar ,
> along
> > with bunch commons jars. Does S2 file upload jars has any conflict with
> > classic file uploads like probably file upload interceptor of S2
> > intercepting earlier functionality etc.
> >
> > Any thoughts please.
> >
>
> I don't know which Commons Artifacts the Struts project is shipping. Maybe
> you should ask on their user list if you haven't already. The latest
> release of Apache Commons FileUpload is 1.3 [1]. Which version are you
> using now that you've upgraded?
>
> Benedikt
>
> [1] https://commons.apache.org/proper/commons-fileupload/
>
>
> >
> > - Kiran
> >
>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>

Re: Commons Apache Fileupload from Classic web app and Struts 2 Integration

Posted by Benedikt Ritter <br...@apache.org>.
Hello Kiran,

2015-06-24 1:22 GMT+02:00 Kiran Badi <ki...@poonam.org>:

> Hi All,
>
> I was using Apache FileUpload 1.2 for my classic web app based on
> jsp/servlets and now I have integrated Struts 2.3.20 with this application.
>
> For some reason after adding S2 with my classic app, its breaking file
> upload functionality which was working fine earlier.Nothing shows up in
> logs other than that all parameters values goes as null.
>
> After doing some analysis I see that S2 ships with file upload jar , along
> with bunch commons jars. Does S2 file upload jars has any conflict with
> classic file uploads like probably file upload interceptor of S2
> intercepting earlier functionality etc.
>
> Any thoughts please.
>

I don't know which Commons Artifacts the Struts project is shipping. Maybe
you should ask on their user list if you haven't already. The latest
release of Apache Commons FileUpload is 1.3 [1]. Which version are you
using now that you've upgraded?

Benedikt

[1] https://commons.apache.org/proper/commons-fileupload/


>
> - Kiran
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter