File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes How to configure custom error pages in jboss-5.1.0? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to configure custom error pages in jboss-5.1.0?" Watch "How to configure custom error pages in jboss-5.1.0?" New topic
Author

How to configure custom error pages in jboss-5.1.0?

Eshwar Prasad
Ranch Hand

Joined: Mar 21, 2008
Posts: 202
Hi,

My query is how to configure custom error pages in jboss 5.1.0

Previously i was using jboss 4.0.0 and hence to display custom error pages I followed the below steps.

1. Added following xml tags in jboss-4.0.0/server/default/deploy/jbossweb-tomcat50.sar/web.xml



2. Placed pagenotfound.jsp and servererror.jsp in jboss-4.0.0/server/default/ deploy/jbossweb-tomcat50.sar/ROOT.war folder.

Currently I started using jboss 5.1.0 but couldn't find jbossweb-tomcat50.sar folder. When i navigated into \jboss-5.1.0\server\default\deploy\jbossweb.sar i couldn't find web.xml or ROOT.war folder. So i tried creating missing folders and files but of couldn't solve the problem.

Please let me know how to configure custom error pages in jboss 5.1.0
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

In 5.0.x and 5.1.0, the global web.xml file is located at server/xxx/deployers/jbossweb.deployer/web.xml, and ROOT.war is at server/xxx/deploy/ROOT.war


JBoss In Action
JL Smith
Greenhorn

Joined: Aug 01, 2008
Posts: 6
Could anyone shine a little more light on _exactly_ how to setup custom error pages in jboss-5.1.0? I've googled and googled but I can't find a solution that works. I even looked through JBoss in Action and couldn't find anything on the subject. Thanks for any help.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

Customer error pages are really a JSP/servlet feature, not anything specific to JBoss AS. What books/articles have you looked at on this topic? (Try this http://pdf.moreservlets.com/ - chapter 5.) What have you done so far that has not worked?
JL Smith
Greenhorn

Joined: Aug 01, 2008
Posts: 6
Thanks for the suggestions Peter. Custom error pages have nothing to do with JBoss. My web.xml was using an older dtd spec and it wasn't able to parse the <error-page> that I had added...that's why I thought it was a JBoss problem. All is good after correcting my web.xml. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to configure custom error pages in jboss-5.1.0?
 
Similar Threads
Default web.xml in JBoss 3.0.x
axis with jboss
Removing JBoss default page
confuse with web.xml in tomcat and jboss
How to remove jboss default home ?