• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display status page  RSS feed

 
sathish kannan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am developing a J2EE based application in Weblogic server.
I have a module where i have to upload a new file. For that i have a JSP which is used for uploading and on submitting i am uploading the file to server using a servlet and displaying a successful page by using another JSP.

My problem is, how can i display a status bar saying that " Please wait your file is uploading" and below that i have to display a status bar. This should come before the successful page, so that user knows that the file is uploading.

In Servlet, I tried using RequestDispatcher to dispatch twice. First line in the doPost method would be dispatching to Status page and after that i am writing the logic for uploading. Finally again i dispatch to Successful page, but it doesnt work.


Please help me out. thanks in advance.
Regards
Shaili
 
sathish kannan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more point to add....

It is similar to how it is done in the same forum, where when we submit "New Topic", it is displaying some page saying that..."Sit Tight we are taking back to JSP" and after that displaying the list of questions posted...

I need something similar to this

Regards
Shaili
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shailesh" -

Welcome to the JavaRanch! We don't have many rules around the 'Ranch, but we do require your display name to follow the JavaRanch Naming Policy.
You can change it here.

The logic behind the behavior you want goes something like this :
  • User performs action to upload file, update content, etc.
  • The URL in the ACTION of the form, or target of the link that applies this action points to a servlet or JSP
  • This servlet or JSP does the following:

  • - checks to see if the user action is finished (i.e. the file is uploaded and available, the content is updated, etc. - this depends on the situation) or failed

    -if so then redirect the user to the updated content, a "Success!" or "Failed!" page, etc.

    -if not then reload this same page after some time period. This can be done by setting the "refresh" HTML header, or by using Javascript.

    Thanks! and welcome to the JavaRanch!
    [ June 16, 2004: Message edited by: Nathan Pruett ]
     
    Brian Pipa
    Ranch Hand
    Posts: 299
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The way I solved this for FileNabber ( http://filenabber.com/filenabber.html ) was to use frames. The top frame did the actual uploading and the bottom frame requested the progress percentage for the current upload.

    Brian
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!