Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overriding HTTP 403 Error Pages in JBoss

 
Arvind Prabhu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to provide JBoss with a custom error page to display for various HTTP error codes? HTTP 403 in particular.
I know that you can specify (in web.xml) the following for each web application deployed under JBoss ...
<error-page>
<error-code>403</error-code>
<location>error403.html</location>
</error-page>
But that limits the error handling to that web application. I want to configure this at a server level.
Thanks,
-Arvind
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try putting it in the default web.xml in the tomcat.sar directory in your deploy directory.
 
Arvind Prabhu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick response and suggestion, but ...
I have JBoss 3.0.x (bundled with Tomcat 4.1.x), and ...
Under the deploy directory, there is a "http-invoker.sar" directory under which there is a "invoker.war" directory. And then in that directory there is a WEB-INF directory with a web.xml file. I added the error-page declaration there; however, it didn't work.
Any thoughts?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic