This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

session.invalidate and jsp form  RSS feed

 
marg wright
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form, that when a person hits reset, I want the session to clear.
I was able to do this by
when on the form the reset button sends them to another page where I have the following code,
which works but I was wondering if there may be a better way to do this, I may use a hidded frame,
but I also don't want to use the absolute url.
Any suggestions, I also will be doing the for a couple of forms.
<%
session.invalidate();
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
String refURL = request.getHeader("referer");
out.println (refURL);
if (refURL !=null)
if (refURL.endsWith("calculator-e.jsp") ) {


%>
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://test/pbcdev/calculator-e.jsp">

<%
} else {
%>
<%--no additional table row required--%>
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://test/pbcdev/calculator-e.jsp">
<% } %>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!