• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Global redirection for HTTP errors in JBoss

 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I thought for a while to place this post here or in security forum but I decided to do it here. The problem is as below,
We have an application running on JBoss 5.0.1. While some HTTP status errors occurs (say for example 404) it gives the http error page saying the version of the JBoss web server (ex: JBoss Web/2.1.2.GA). Is there any way other than using configuration in deployment descriptor to redirect this or handle in some other way. Basically looking for configuration at the level of the port on which JBoss is running rather than at the context level

Thanks in advance
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody there?

Latest Update:
We have configured the deployment descriptor in ROOT.war to redirect the user to some HTML on some errors and it works fine. For example, if I give http://localhost:8080/junkkk.html which doesn't exist, now it is redirected to the custom server error HTML provided.
code used is like Now that there are so many such error codes too much configuration changes are required. On top of that, say if I have three applications to be deployed in the JBoss, I have to configure 3 more times (in each web.xml) and it sums up to 4. Is there a way out?
At least is there a way to minimize the error codes in configuring(some generic way).
Thanks in advance,
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no central location to do this for all apps, you have to do it for each app separately.

I think I recall a discussion about this earlier, where the global web.xml was edited to contain the <error-page> entries but still each web app had to have a copy of the error page (because the error page is relative to the apps context).
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You Peter, Ha! looks like maintaining a web application is never going be so easy forever, as we never get satisfied..
 
reply
    Bookmark Topic Watch Topic
  • New Topic