Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to browse & upload the image using struts2?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one suggest,what are all the external jars required while uploading an image by using struts2
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you would require "commons-fileupload-1.1.1.jar"
 
Vinod Vinu
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you able to solve your problem ?
 
Deepthi Xavy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did in jsp,servlets....But just now started with struts2...so am not able to get through
 
Sheriff
Posts: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Deepthi Subramaniam wrote:i did in jsp,servlets....But just now started with struts2...so am not able to get through



Are you still having problem with it even after adding the apache file upload library?? If you want to know how it is done, then you can look a tutorial on the internet like this one...
 
Deepthi Xavy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried.......but dint get yet.........sujest some other link,or any sample code,if you have done that
 
Ankit Garg
Sheriff
Posts: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try all the steps given in that tutorial?? I didn't try to create the program given in that tutorial but I think it will work. Can you tell us the problem that you are facing. If you search on google a term like struts2 file upload example, you'll get a lot of tutorials and stuff...
 
Deepthi Xavy
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai i wanna for image upload.........not for file upload......k
 
Vinod Vinu
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi deepti.....i have sent you a personal message...
please check your inbox and reply me
 
Ankit Garg
Sheriff
Posts: 9674
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Deepthi Subramaniam wrote:hai i wanna for image upload.........not for file upload......k



An Image is after all a file. You can use filter to allow only images as given here. And don't use workds like k, use the full word ok...
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is FileUploadInterceptor in struts2.0.
Use this interceptor which will do all your work.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic