This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes struts2 upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2 upload" Watch "struts2 upload" New topic
Author

struts2 upload

Rajamanickam Palani
Greenhorn

Joined: Mar 01, 2013
Posts: 6
Hi Friends,

How can i upload a file through javascript please help me.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Hello Rajamanickam Palani ,

You want to upload file via pure javascript or via struts2 ?

For struts2 , you can use the file filed in the struts form tag



On the action side



If you want to mix in Javascript with it , then you can call bind the form submit button with java script and fire an ajax request to upload the file to the server.


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts2 upload