Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles




JSPWiki v2.2.33

[RSS]


Hide Menu

CreateAnAJAXBasedFileuploadProgressbarDialog


Difference between version 83 and version 82:

At line 266 changed 1 line.
Now point your browser to {{http://< your host >:8080/editUploadFile.html}} login and test that it works. (you may have to reload the browser to enshure it loads the css and js files (Ctrl + r in firefox and ie) ). Remember to pick a file of a certain size if you are uploading to localhost. You should now see this image:
Now point your browser to {{http://< your host >:8080/editUploadFile.html}} login and test that it works. (you may have to reload the browser to ensure it loads the css and js files (Ctrl + r in FireFox and IE) ). Remember to pick a file of a certain size if you are uploading to localhost. You should now see this image:
At line 271 changed 1 line.
*Change log4j to see whats going on. In the file log4j.properties change the line {{{log4j.rootCategory=DEBUG, mail}}} to {{{log4j.rootCategory=DEBUG, R}}} to get the log log mesages written into a logfile.
*Change log4j to see whats going on. In the file log4j.properties change the line {{{log4j.rootCategory=DEBUG, mail}}} to {{{log4j.rootCategory=DEBUG, R}}} to get the log log messages written into a log file.
At line 276 changed 4 lines.
**__{{fileUploadForm.jsp}}__ and lbContent - the jsp page containing the struts form. It containf a {{lbContent}} div tag which represent the html code inserted in the upload dialog. It also contains an embeded javascript with the function {{function upload(form)}} This script only trigger the upload mechanism if one or more files has been selected.
**__{{dwrUpload.js}}__ - This script is the ajax functions that updates the content of the upload dialog. You can tweak the dialog refreash rate here.
**__{{ExtendedMultiPartRequestHandler.java}}__ - a slightly changed Struts controller (change marked by "Changed this section of code, that is it."). There is one important line here {{{UploadListener listener = new UploadListener(request, 1);}}} The '1' here means delay to 1 millisecond. By increasing this value uploads wil take longer time but will also be less CPU intensive.
**__{{engine.jsp}}__ - is actually engine.js extracted from dwr1.x and tweaked to enshure dwr also works with cookies disabled. For details see "Support for DWR without cookies" [http://getahead.ltd.uk/dwr/fixes]. This issue is solved in version 2 of dwr.
**__{{fileUploadForm.jsp}}__ and lbContent - the jsp page containing the struts form. It contains a {{lbContent}} div tag which represent the html code inserted in the upload dialog. It also contains an embedded javascript with the function {{function upload(form)}} This script only trigger the upload mechanism if one or more files has been selected.
**__{{dwrUpload.js}}__ - This script is the Ajax functions that updates the content of the upload dialog. You can tweak the dialog refresh rate here.
**__{{ExtendedMultiPartRequestHandler.java}}__ - a slightly changed Struts controller (change marked by "Changed this section of code, that is it."). There is one important line here {{{UploadListener listener = new UploadListener(request, 1);}}} The '1' here means delay to 1 millisecond. By increasing this value uploads will take longer time but will also be less CPU intensive.
**__{{engine.jsp}}__ - is actually engine.js extracted from dwr1.x and tweaked to ensure dwr also works with cookies disabled. For details see "Support for DWR without cookies" [http://getahead.ltd.uk/dwr/fixes]. This issue is solved in version 2 of dwr.
At line 281 changed 1 line.
**__{{dwrUpload.css}}__ - Here the progressbar can be styled.
**__{{dwrUpload.css}}__ - Here the progress bar can be styled.

Back to CreateAnAJAXBasedFileuploadProgressbarDialog, or to the Page History.