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]



Reply via email to