aspose file tools
The moose likes JSP and the fly likes web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "web.xml" Watch "web.xml" New topic
Author

web.xml

bnkiran kumar
Ranch Hand

Joined: Mar 02, 2006
Posts: 171
in DD, i made following entry after <welcome-file-list> entry ,
<error-page>
<error-code>404</error-code>
<location>/Notfound.html</location>
</error-page>

In Notfound.html,
i made following enty,
<%@page isErrorPage="true" %>

when i am trying an Url which does not exist, Notfound.html is not getting called instead container is throwing its default error page...


Kiran Kumar.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14669
    
  11

If you're using IE, make sure that "display friendly errors" is turned off in the options (I can't recall the exact name of the option)


[My Blog]
All roads lead to JavaRanch
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by bnkiran kumar:


In Notfound.html,
i made following enty,
<%@page isErrorPage="true" %>


If you want your JSP directives to actually do something, you need to change the file extension from ".html" to ".jsp".


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Where did you put your Notfound.html page?
Make sure it's in the root of the web application.

Also check the spelling.
Make sure the casing is exactly the same in the deployment descriptor as it is in the actual file name.
bnkiran kumar
Ranch Hand

Joined: Mar 02, 2006
Posts: 171
Thanks Satou and Ben,i will check...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: web.xml
 
Similar Threads
custom error pages in tomcat 3.3a
Error Page Not Found
web.xml and error-page
Why is my error page not invoked?
jsp:include when the html to be included is not present