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

web.xml

bnkiran kumar
Ranch Hand

Joined: Mar 02, 2006
Posts: 176
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: 14688
    
  16

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: 176
Thanks Satou and Ben,i will check...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: web.xml