• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Issue with ServletFileUpload when including both Struts1 and struts2 jars in classpath  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

My application is on Struts1. Later on I have included Struts2 to use its advanced features.

I have written following code to parse the request object which runs perfectly fine on Struts1 -

F

I am getting all request items in this list when I am using only Struts1 in my application.

I debugged and found out that when I included struts2-core-2.2.1.1.jar in my application's classpath, this list is returned as empty. The above mentioned code stopped working after I included struts2-core-2.2.1.1.jar to use Struts2 features in application.

I am not able to find out the relation of this code with struts1 and struts2 jars as the above classes are from commons-fileupload-1.1.jar.

Any help will be greatly appreciated.


Thanks & Regards,
Sunny Choudhary
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the same problem with struts upload and struts2. Have you find a solution?


kind regards,

F.O.
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friend, it's simplified in sturts 2 there is one interceptor called fileUploadInterceptor it's responsible for file uploading. Follow the link http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/FileUploadInterceptor.html clearly explained here.
 
Frank Otto
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have struts 1 upload action, but if I include struts2 in my app, the upload will not work. Without struts2 it works perfectly.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want migrate your app from struts 1 to struts 2 change your action class struts 2 style or else stick to struts 1. By adding the jar file you will not get struts2 capabilities.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!