Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts 2 Image upload  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.
I'm doing a project using Struts2 and dojo, but am facing a problem while I'm trying to upload user photo in User Profile page.
I want to upload the user photo without refreshing the page.
I've googled a lot and found most of the topics regarding my requirement, use php coding.
Some other topics explains uploading image using Struts2 but problem is that in each case the Success action is redirected to another page.
Using Jquery or Ajax may be acceptable.

Please help me.
Thanks again.
 
Bartender
Posts: 9462
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
Dojo and jQuery are both AJAX libraries. The server side code should be the same in both instances. I know the Struts 2 jQuery plugin has a SubmitTag that makes an asynchronous form submit easy. All you'd have to do is set the image source once the upload is complete.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!