views:

45

answers:

1

Hi,

I have following situation of deployment:

  • application_one.war
  • application_two.war
  • application_three.war

When I deploy it in Jboss, I get three url contexts:

  • http//myserver/application_one/
  • http//myserver/application_two/
  • http//myserver/application_three/

Is it possible to change (prepend) globally an additional path to all deployed webapplication in a single setting, so that my new path would look like this?

  • http//myserver/globalprefix/application_one/
  • http//myserver/globalprefix/application_two/
  • http//myserver/globalprefix/application_three/

I do not want to change the war by using jboss-web.xml, but I am looking to do this in a general way on a central position, so even new wars will get this context prepended.

+1  A: 

This is slightly off topic, but in a lot of production environments you'd have a web server such as Apache "in front" of your appserver (in this case JBoss), which you would be able to set up with a path (check out mod_rewrite, though don't quote me on that).

beny23
This is exactly what we do. The http//myserver/globalprefix/application_one/ is more readable so we have the jboss with it's deployed app on http//myserver:98989/application_one/ and then a global apache config which listens on default port and reroutes to the specific jboss servers
Calm Storm