Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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: 9550
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.
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!