tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Doe" <mobilephant...@hotmail.com>
Subject Query with 404 error processing -- Tomcat 5.0.19
Date Mon, 13 Dec 2004 00:57:52 GMT
Can someone please explain why I get the default Tomcat 404 error when a 
pages does not exist?

I have a set of URLs that end with *.ext. These are all routed to a servlet 
called Router, and these all work fine. This servlet has catch-all at the 
end that displays an error message when an unknown *.ext is processed. That 
all works fine.

However, when an unknown *.jsp file is processed I get the default Tomcat 
error:

   HTTP Status 404 - /unknown.jsp
   type Status report
   message /unknown.jsp
   description The requested resource (/unknown.jsp) is not available.
   Apache Tomcat/5.0.19

The error in the generates this output in the log file:

2004-12-13 00:40:10 ApplicationDispatcher[/Server] Servlet.service() for 
servlet default threw exception
java.lang.ClassCastException
	at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:182)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
...

2004-12-13 00:40:10 org.apache.catalina.core.StandardHostValve@96b5c2: 
Exception Processing ErrorPage[errorCode=404, location=/404.html]
java.lang.ClassCastException
	at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:182)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
	at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:750)
	at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:512)
...

Here is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
        <display-name>My server</display-name>

        <servlet><servlet-name>Router</servlet-name>
                <servlet-class>com.mycompany.Router</servlet-class>
        </servlet>
        <servlet><servlet-name>InitServlet</servlet-name>
                <servlet-class>com.mycompany.InitServlet</servlet-class>
                <load-on-startup>2</load-on-startup>
        </servlet>

        <servlet-mapping><servlet-name>InitServlet</servlet-name>
                        <url-pattern>/InitServlet</url-pattern>
        </servlet-mapping>
        <!-- All URLs end .ext. These are processed by the front controller. 
-->
        <servlet-mapping><servlet-name>Router</servlet-name>
                        <url-pattern>*.ext</url-pattern>
        </servlet-mapping>

        
<session-config><session-timeout>30</session-timeout></session-config>

        <welcome-file-list><welcome-file>index.html</welcome-file>
        </welcome-file-list>
        <error-page><error-code>404</error-code>
                <location>/404.html</location>
        </error-page>
</web-app>

And my 404.html file:

<html>
<head>
</head>
<body>
Error!
</body>
</html>

Any help will be, as always, greatly appreciated.

Joe.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


Mime
View raw message