File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom error 404 page

 
Tejpal Singh
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have my JBoss-2.2.1 configured with Tomcat-3.2.1.
I want to redirect the flow of the application on "Page not found" or "error 404" to a customized page say "error404.html".
I have tried all that i could find on various forums but still cant get it working.
Following is what i am using in my tomcat web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
...
...
<error-page>
<error-code>404</error-code>
<location>/error404.html</location>
</error-page>
</web-app>
The default context is ROOT.
i.e. the xml file is located under the path D:\JBoss-2.2.1_Tomcat-3.2.1\tomcat\webapps\ROOT\WEB-INF
The html file is located under the path D:\JBoss-2.2.1_Tomcat-3.2.1\tomcat\webapps\ROOT\
Please help me on my above issue.
Cheers!
- Tejpal
 
norman richards
Author
Ranch Hand
Posts: 367
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to deploy a webapp of mine with and error-code on that version of JBoss and it failed. It failed on the latest 2.2.2 release, but ran fine on 2.4.10 and 3.0.7.
My suggestion is to upgrade to JBoss 3 if possible, and 2.4 if you really need an older JBoss...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic