Hi Matthew,

The problem with your JSP is that it has a syntax error. When Tomcat fails to compile 
the error page it uses it's internal error page.

You should delete the second line, and replace the first with the following

<%@ page isErrorPage="true" import="java.io.*" %>

The import is part of the page directive not a directive itself.

Best Regards,
Tarek Nabil

-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 7:39 PM
To: Tomcat Users List
Subject: RE: isErrorPage="true" NOT WORKING?



Howdy,
Does it work if you set the exception-type as
java.io.FileNotFoundException in your web.xml?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Matthew Oatham [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 21, 2003 12:12 PM
>To: [EMAIL PROTECTED]
>Subject: Re: isErrorPage="true" NOT WORKING?
>
>BTW the exception is being thrown from a method inside a servlet as
>follows:
>
>   public synchronized void writeOrder(HttpServletRequest request)
>    throws IOException {
>
>        Date d = new Date();
>        DateFormat df = DateFormat.getDateInstance();
>        String fileName = (request.getRemoteUser()
>            + "." + df.format(d));
>        //Create FileWriter for append.
>        FileWriter fw = new FileWriter(ordersDir
>            + System.getProperty("file.separator")
>            + fileName
>            + ".txt", true);
>        PrintWriter pw = new PrintWriter(fw);
>        pw.println(orderString(request));
>        //Close the file.
>        fw.close();
>    }
>
>
>From: "Matthew Oatham" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: isErrorPage="true" NOT WORKING?
>Date: Mon, 21 Jul 2003 17:04:57 +0100
>
>Hi,
>
>I have a web app inside which I have an errorPage.jsp file. My web.xml
file
>defines:
>
>  <error-page>
>    <exception-type>java.lang.Throwable</exception-type>
>    <location>errorPage.jsp</location>
>  </error-page>
>
>And my errorPage.jsp is as follows:
>
><%@ page isErrorPage="true" %>
><%@ import="java.io.*;"%>
><html>
><link rel="STYLESHEET" type="text/css" href="styles/common.css" />
><head><title>TOKENS Offline Order Error</title></head>
><body>
>
><p><font class="TitleFont">Error</font></p>
><p><font class="TextFont">An error occurred performing the last
>operation.</font></p>
><p><font class="TextFont">Please press the back button and try again.
>Alternatively contact the System Administrator.</font></p>
>
>exception.printStackTrace(new java.io.PrintWriter(out, true));%>
></body>
></html>
>
>However when I encounter a java.io.FileNotFoundException:
>c:\solttma\orders\administrator.21-Jul-03.txt (The system cannot find
the
>path specified) exception I get the old tomcat error page and not the
error
>page I created?
>
>Any ideas?
>
>Thanks
>
>Matt
>
>_________________________________________________________________
>Express yourself with cool emoticons - download MSN Messenger today!
>http://www.msn.co.uk/messenger
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>_________________________________________________________________
>Tired of 56k? Get a FREE BT Broadband connection
>http://www.msn.co.uk/specials/btbroadband
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to