BLANK ERROR SCREEN
Hi Everyone
At the top of my page I have the following declaration.
<%@ page import="java.sql.*,java.lang.*,java.util.*" errorPage="myerrorpage.jsp" %>
on my error page i have
-
myerrorpage.asp looks like this
<%@page isErrorPage="true" %>
<%=exception.getMessage()%>
-
exception contains no value so the screen is blank.
How can I pass information to the exception object ? ?
Currently in my bean i'm just throwing the exceptions i'm not catching it .
like this:
public Vector getVecUsersAnswers(String strInterviewId,String strSectionId)throws SQLException, Exception{
...
}
ANy Advice ?
[nobr]I'm by no means an expert, but I have the following errorpage that I use throughout my applications...
<%@ page isErrorPage="true" %>
<HTML>
<HEAD><TITLE>Error in Processing Request</TITLE></HEAD>
<BODY bgcolor="#999999" alink="#999999">
<CENTER><FONT COLOR="YELLOW">
<h1>An error has occured, please refer to the comment below:</h1>
<br>
<H1><FONT COLOR="BLUE"><%=exception.getMessage() %></FONT></H1>
<H1><p>
Please press the back button to fix the problem.
</p>
<p>
If problem persists, please contact the developer responsible.
</p></H1>
</FONT></CENTER>
</BODY>
</HTML>
[/nobr]
hi
thanks for your reply.
i tried the solution you presented but there is no value in exception i guess.
i'm guessing that my bean should have a try catch statment that will "perhaps" return the exception like this
try {
} catch (SQLException e) {}
******Do you guys have something like this in your beans in order to make the errorpage exception print out a value ? ********
Stephen
This error page gets displayed only when there is an exception thrown..You wouldn't want the users to know about the exception instead have something like::
Error.jsp:
<%@ page isErrorPage="true" %>
<html>
<head><title>ERROR PAGE</title></head>
<body>
<form name="form" action="Start page URL" method="post">
<center>
<font face="Arial, Helvetica, sans-serif" size="2">The following error has
occurred:</font>
<font face="Arial, Helvetica, sans-serif" color="red"><b><font size="2"><%= exception.toString() %> </font></b></font><font face="Arial, Helvetica, sans-serif">
<font size="2">Please press continue to return to the Start page. Thank you.
</font></font>
<P>
<input type="submit" value="Continue">
</center>
</form>
</body>
</html>