This is a standard servlet configuration done in the web.xml. Hit the sun j2ee tutuorial for the details.
Yes, you need to add the custom error handling attributes to the WEB-INF\web.xml file for your app.
<web-app> .... <error-page> <exception-code>400</exception-code> <location>/pageToRedirectTo.html</location> </error-page> ....
I have tried doing the same thing as you advised. But it doesn't work. What WEB-INF directory should I put the file in?
Hello, I have added the following to web.xml
<error-page> <error-code>404</error-code> <location>/404.html</location> </error-page>
but i have a few questions, and if someone could help it will be much appreaciated!
were would i find /404.html on the filesystem?
i put my custom error page in here - deploy/jbossweb-tomcat50.sar/ROOT.war/
and it works on the one machine, but one the other with virtualhosts it doesn't - does virtualhosts affect /404.html and would it be unique for every virtualhost?
i have implemented custom error pages on apache2 no sweat, but it proves to be quite a mission with tomcat, so i'm probably doing something wrong :)
thanks in advance.
If anyone is still interested, I believe I can help. I've been working on these puzzles for about 14 hours now and have many correct answers.