aspose file tools*
The moose likes Struts and the fly likes How to browse & upload the image using struts2? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to browse & upload the image using struts2?" Watch "How to browse & upload the image using struts2?" New topic
Author

How to browse & upload the image using struts2?

Deepthi Xavy
Ranch Hand

Joined: Aug 31, 2009
Posts: 32
Can any one suggest,what are all the external jars required while uploading an image by using struts2
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
you would require "commons-fileupload-1.1.1.jar"


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
are you able to solve your problem ?
Deepthi Xavy
Ranch Hand

Joined: Aug 31, 2009
Posts: 32
i did in jsp,servlets....But just now started with struts2...so am not able to get through
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Deepthi Xavy
Ranch Hand

Joined: Aug 31, 2009
Posts: 32
I tried.......but dint get yet.........sujest some other link,or any sample code,if you have done that
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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

Joined: Aug 31, 2009
Posts: 32
hai i wanna for image upload.........not for file upload......k
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
hi deepti.....i have sent you a personal message...
please check your inbox and reply me
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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...
Mukesh Ranjan
Greenhorn

Joined: Jun 24, 2009
Posts: 22
There is FileUploadInterceptor in struts2.0.
Use this interceptor which will do all your work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to browse & upload the image using struts2?
 
Similar Threads
STRUTS2
ajax and struts2
Struts2
struts2
struts2