File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Refresh Once Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Refresh Once" Watch "Refresh Once" New topic

Refresh Once

Pol Appan
Ranch Hand

Joined: Aug 26, 2004
Posts: 144
How can I make a JSP page refresh only once at the time of loading.

Any help is highly appreciable.


Never take anything for granted because you never know when you will lose it
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Save a flag that indicates if the page has been refreshed using a session variable or cookie. On the second time you could then program the variable to wipe itself so future refreshes will still happen if the page is loaded all over again.

Why would you want to refresh a page immediately after loading it?

[OCA 8 Book] [Blog]
Pol Appan
Ranch Hand

Joined: Aug 26, 2004
Posts: 144
I want to load it in the JSP which I deployed to portal.

Could you kindly give a sample code. I have a dynamic image.

I agree. Here's the link:
subject: Refresh Once
It's not a secret anymore!