Inside the StrutsServlet's doGet method

RequestDispatcher dispatcher = null;

request.getRequestDispatcher(/err/SQL.jsp);

try {

//  operation which causes 500
}
catch (Exception se) {
//forwards to a login.jsp
dispatcher.forward(request, response);
}

check out http://java.sun.com/j2ee/1.4/docs/api/index.html
Regards,
Martin-
----- Original Message ----- From: "David Johnson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Thursday, May 26, 2005 10:55 AM
Subject: Creating a standard page to handle Error 500


Hey all
I recently added the following to my JSP pages to force them not to be
cached:
<% response.setHeader("Pragma","no-cache");%>
<% response.setHeader("Cache-Control","no-store");%>
<% response.setDateHeader("Expires",-1);%>
the result is that if the user hits "back" then "reload" they get an error
500. How can I create a page that will handle any error 500 that comes up?
Essentially, I just want to display a message that tells the user to
re-login..
thoughts?

--
-Dave
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to