Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global redirection for HTTP errors in JBoss

 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • 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 Java Oracle
  • Mark post as helpful
  • send pies
  • 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,
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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 Java Oracle
  • Mark post as helpful
  • send pies
  • 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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic