Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expiring a page

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can i expire a page in JSPs?

I want to immediatelty expire jsp page1 as soon as the submit button is cleared that posts info to jsp page2 such that when back button of the browser is clicked page1 is not opened but actually expired.

Regards,
- Saira
 
Put this in your page inside the <HEAD></HEAD> tags
<META HTTP-EQUIV=&quot;expires&quot; CONTENT=&quot;0&quot;> I hope this helped! ;-)
- Casey Winans
 
here's something else you could ad to page 2 (note i'm assuming you're on page 2):

<SCRIPT LANGUAGE=&quot;JavaScript&quot;><!--
function noGo() {
if (document.images)// document.images inidicates all browsers later than IE3.2 and NS 3
location.replace('page2.jsp');
else
location.href ='page2.jsp';
}
//--></SCRIPT>

then add the following to the body tag:
<body onLoad=&quot;noGo();&quot;>


another way to do it woulld be to start a session on page 1
with this kind of logic:
if session equals true all of your form values are void
store all page 1 values as part of that session (as session values)
on page 2 hand off all the session values to hidden values on a page 2 form
kill the session from page 1, then start a page 2 session, pick up those vales and away you go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top