It is working sudhir.. but the problem is error.jsp is displaying with in the test.jsp (like a page include).. wiered haa.. Is there anything wrong with test.jsp try catch flow??
-----Original Message----- From: Sudhir Movva [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 3:39 PM To: 'Tomcat Users List' Subject: RE: How do we get an erro.jsp when an exception occured in the te st.j sp Try using <% response.sendRedirect("yourerrorpage.jsp"); %> in catch block -Sudhir. -----Original Message----- From: Srinivasu Gandu [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 3:27 PM To: 'Tomcat Users List' Subject: How do we get an erro.jsp when an exception occured in the test.j sp My web.xml contains error page tag as below <error-page> <exception-type>java.lang.Exception</exception-type> <location>/error/error.jsp</location> </error-page> ----------------------------- Here is my test.jsp.. <%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page errorPage="/error/error.jsp" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <% try{ //Do some logic to get the some variables.. %> </head> <!-- display the variables --> <table><tr> <td width="38" align="left" valign="top"> </td> <td width="10" align="left" valign="top"> </td> <td width="946" align="left" valign="top" class="heading"><%=test%></td> </tr></table> <% }catch(Exception e){ e.printStackTrace(); } %> </html> ---------------------------------------- When an exception occures in the test.jsp how do I pass it to the error.jsp???? I want to display this exception in the jsp what ever it might be.. will appreciate the response! I am using tomcat4.1.24 on win98. Thanks - srini. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
