Hello berwart.
Here you have an Error Page example:
You can extends, exception class and in the jsp's when an error ocurred you
can throw a exception controlled or if the exception is outside.
In the errorPage, you can know the exception that produced the jsp (if was a
myException or an Exception).
<%@page language="java" isErrorPage="true"
import="java.sql.*,java.awt.*,java.io.*,
javax.servlet.*,javax.servlet.http.*" %>
<html>
<head>
<title></title>
</head>
<body>
<form name="salir" action ="errorAplication.jsp" target="_top"
method="POST">
<input type="hidden">
</form>
<%
if(exception instanceof myException){
String m = ((myException) exception).getMensaje();
%>
<SCRIPT language="JavaScript">
<!--
alert("Error : " + "<%=m%>");
document.salir.submit();
//-->
</SCRIPT>
<%
}
else{
%>
<SCRIPT language="JavaScript">
<!--
alert("ERROR ADVERTISEMENT: <%=exception%>");
document.salir.submit();
//-->
</SCRIPT>
<%
}
%>
</body>
</html>
> -----Mensaje original-----
> De: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]En nombre de BERWART Thierry
> Enviado el: viernes 18 de mayo de 2001 10:40
> Para: [EMAIL PROTECTED]
> Asunto: ERROR page ...
>
>
> Hello,
>
> I want to create a beautiful error page for my application but
> I have no idea about the design ...
> and this is why I ask you whether you would have any examples of error
> page...
>
> Thanks
>
> Thierry
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets