This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3703

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?

My Blog: Down Home Country Coding with Scott Selikoff
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
Similar Threads
Upload attachment to QC [Quality Center] using java
javascript error in yahoo mail
Refresh times to be one
Refresh Page In other Frame
JARS are visible threrough RAD 7.0