-
1. Re: how do you map multiple context paths to the same web ap
neelixx Oct 20, 2005 10:25 AM (in response to akhopkar)Use virtual hosts:
http://wiki.jboss.org/wiki/Wiki.jsp?page=VirtualHosts
Also, for mapping the virtual hosts to a single web app, this was taken from the above URL
Also, a single war can be deployed to mulitple virtual hosts through the jboss-web.xml virtual-host element. To make the jmx-console available on localhost, vhost1 and vhost2, edit the jmx-console.war/WEB-INF/jboss-web.xml
<jboss-web>
<!-- Uncomment the security-domain to enable security. You will
need to edit the htmladaptor login configuration to setup the
login modules used to authentication users.
<security-domain>java:/jaas/jmx-console</security-domain>
-->
<virtual-host>localhost</virtual-host>
<virtual-host>vhost1.mydot.com</virtual-host>
<virtual-host>vhost2-alias</virtual-host>
</jboss-web> -
2. Re: how do you map multiple context paths to the same web ap
akhopkar Oct 20, 2005 2:44 PM (in response to akhopkar)Thank you very much for your reply.
I had actually already investigated virtual hosts. The problem here is that it is a requirement for us that we need to be able to actually see the:
https://www.mysite.com/company1/myapp
https://www.mysite.com/company2/myapp
https://www.mysite.com/company3/myapp
in the URL of the browser for this and all subsequent requests, and the www.mysite.com cannot change because we are using SSL and we do not wish to purchase an SSL certificate for each company that we use. Hence, what we really need is for this web app to be referenced by company1/app or company2/app or company3/app without changing any part of https://www.mysite.com
So really what I'm asking is is there any way to alias the webapp lets say test_webapp by the names company1/test_webapp, company2/test_webapp?
Is this possible to do?
Amarish -
3. Re: how do you map multiple context paths to the same web ap
gmoh Oct 20, 2005 3:05 PM (in response to akhopkar)the servlet specification allows mapping like that (i.e., /*/myapp) in web.xml.
on the other hand, it does support the syntax /myapp/*, would that work for you? -
4. Re: how do you map multiple context paths to the same web ap
akhopkar Oct 21, 2005 12:03 PM (in response to akhopkar)Hi, Thanks for your reply.
The thing is that I'm aware, there there's a way to manipulate servlet mapping URL's and other things to accomplish this. However, we've got like 4 applications already written that have been running for a while, and they need to be migrated so that they do this, and there are a lot of servlets, struts pages, etc. So what I'm trying to do is find a global way to do this without actually modifying the individual applications themselves.
That's why I'm searching for some type of global configuration option.
Amarish