tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35230] New: - Page not found error
Date Mon, 06 Jun 2005 06:02:12 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35230

           Summary: Page not found error
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: rockvole@gmail.com


Hi,
These are my 2 files :
errhandler.jsp
<%@ page errorPage="errorpage.jsp" %>
<html>
  <body>
    <form method=post action="/cw/errhandler.jsp">
      What's the coolest programming language in the known universe?<p>
      Java<input type=radio name=language value="JAVA" checked>
      C++<input type=radio name=language value="CPP">
      Visual Basic<input type=radio name=language value="VB">
      <p>
        <input type=submit>
    </form>

<%
  if (request.getMethod().equals("POST")) 
  {
    if (request.getParameter("language").equals("JAVA")) 
    {
      out.println("<hr><font color=red>You got that right!</font>");
    } else {
      throw new Exception("You chose the wrong language!");
    }
  }
%>
</body>
</html>

and :
errorpage.jsp
<%@ page isErrorPage="true" import="java.io.*" %>
<html>
  <body>
    <h1>
      Error Page
    </h1>
    <hr>
    <h2>
      Received the exception:<br>
      <font color=red>
      <%= exception.toString() %>
      More<br>
    
        
      </font>
    </h2>
  </body>
</html>

When I run the first file, and choose the error generating conditions, the 
tomcat server returns "The page cannot be displayed" - its as if the page is 
not recognised by the system and the page cannot be found. There are no errors 
in the logs.
If I add the line :
      <%  exception.printStackTrace(new PrintWriter(out));  %>
below the More<br> line, all of a sudden my page appears, and the results from 
all lines in errorpage.jsp appear.
Thanks for looking into this issue as it has been driving me batty for 2 days.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message