I have
testing isErrorPage
my
jsp files are: hello.jsp and errorHandler.jsp
<!@ page errorPage="errorHandler.jsp" %>
<html>
<body>
<% if(request.getParameter("username")==null){
throw new RuntimeException("Name not specified");
}
%>
Hello, <%= request.getParameter("username") %>
</body>
</html>
<!@ page isErrorPage="true" %>
<html><body>
Unable to process <%= exception.getMessage() %>
</body></html>
and form.html as
<html><body>
<h1 align="center">Error Page Test </h1>
<form method="POST" action="hello.jsp">
Enter your name<p>
<input type="text" name="username" size="20"><br>
<center>
<input type="submit">
</center>
</form></body></html>
when i do not type a name in the box, should'nt i get
Unable to process : Name not specified
instead i get
Hello,
[ May 30, 2005: Message edited by: H Singh ]