Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Which JSP server method can push a refresh to browser?

Thread view: 
festo - 15 Oct 2006 03:18 GMT
Hi guys,

I need some help with a method that will push a refresh to browser once
my server finishes processing.
This should happen regardless of a users action on the browser.  I just
don't know where to look.

Please help.

Thanks

kana
Arne Vajhøj - 15 Oct 2006 03:36 GMT
> I need some help with a method that will push a refresh to browser once
> my server finishes processing.
> This should happen regardless of a users action on the browser.  I just
> don't know where to look.

Output some JavaScript or HTML META tag that does it.

Obviously it can not be done entirely server side.

Arne
Manish Pandit - 15 Oct 2006 03:41 GMT
If you are using struts, that is how it would normally work. Your
action needs return the next URL to go to - which you can keep the same
as the page that invoked the action.

If you are not using struts or some sort of an MVC solution, the server
side cannot refresh the browser.

-cheers,
Manish
Simon Brooke - 15 Oct 2006 08:43 GMT
> I need some help with a method that will push a refresh to browser once
> my server finishes processing.
> This should happen regardless of a users action on the browser.  I just
> don't know where to look.

That's because it is deliberately impossible; it's part of the core design
of the WWW that you can't do that. The user controls the browser, you
don't. You can only make suggestions.

However, with most modern browsers in their default setting, the following
will work:

Output a 'please wait' page to the browser when you start processing, with
the following in it's HEAD:

 <meta http-equiv="Refresh"
       content="0; URL=finishedprocessingurl">

Where 'finishedprocessingurl' is some URL to which your application will
only respond when it has finished processing.

Signature

simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

                       ;; Quidquid latine dictum sit, altum sonatur.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.