wood burning stoves 2.0*
The moose likes Other Java Products and Servers and the fly likes Customize error page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Customize error page" Watch "Customize error page" New topic
Author

Customize error page

Mariano Guelar
Greenhorn

Joined: Aug 11, 2004
Posts: 1
Hi Guys, I�m trying to customize the error page with Resin 3.08.
I added the following to resin.conf:


<host id=''>
<error-page error-code='404' location='/missing.htm'/>


Instead of my customized 404 error-page, I get a default 404 error saying: "/missing.htm was not found on this server. "

This is what the log say:

[15:11:50.095] real-path /missing.htm -> /data2/error/missing.htm
[15:11:50.096] no default servlet defined for URL: '/missing.htm'

Does anyone know how can I resolve this problem?

Thanks a lot,

Mariano
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320
You have to define your default error page in web.xml
Example:
<error-page>
<error-code>404</error-code>
<location>/errorHandler.jsp</location>
</error-page>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Customize error page
 
Similar Threads
web.xml
Tomcat cant recognize "error-page" tag in web.xml
Problem with Custom Error Page
Handle all error codes other than one
User Defined Error Page for 404