Am 30.11.2010 21:59, schrieb Harsh C:
How can I setup a AJAX-ified file upload page using Struts 2? If there is
some integration with Dojo, it would be even better i.e. not use the OS
specific file upload button etc.


There are various resources floating around in the net regarding "AJAX file upload". Strictly speaking, there is no such thing as an "ajax file upload" to begin with. If your web app needs to upload a file, there are two choices: Either you use <input type="file"> in all its ugliness (or beauty, if you put effort into styling the control properly), or you implement a (signed) Java applet to grab the file from your client's disk and upload it to the server.

That being said, i would still suggest to google for "AJAX file upload" because some of the resources that you can find are actually quite useful and describe a solution to the problem that your web app may have here and there, namely that you have an html form on your page already and that you now need an extra form (on a popup dialog, layer, whatever) that can be submitted while the original form is *not* (or not yet) submitted. For this, ajax comes into the picture: It allows you to handle a separate HTTP submit roundtrip to accept the uploaded file, do some validation with it and show the appropriate errors on your popup dialog when the rest of the other form has not yet been submitted.

And, finally: All this has nothing to do with Struts specifically.

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to