Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Overriding HTTP 403 Error Pages in JBoss

 
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
 
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?
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic