How to set up cross-context between webapps deployed inside ear in JBoss 4

3.9k Views Asked by At

We have 2 war files inside an ear file deployed in JBoss 4. We need to switch between web app contexts for which we are using UrlRewriteFilter.

The problem we are facing is we are not able to perform a requestDispatcher.forward() between these webapps. I believe this can be achieved by setting cross-context attribute to true in the web container (Tomcat 5.5). We have done the following setting -

In /default/deploy/jbossweb-tomcat55.sar/server.xml

<Host name="localhost"
        autoDeploy="false" deployOnStartup="false" deployXML="false">
<Context path="/esa" docBase="/deploy/app.ear/webapp1.war" 
    debug="0" crossContext="true"/>
<Context path="/mstrapp" docBase="/deploy/app.ear/webapp2.war" 
    debug="0" crossContext="true"/>
</Host>

But during JBoss startup, it tries to deploy these 2 webapps and throws errors related to libraries not found (they are inside the ear).

How do we achieve cross context in this case ?

Thanks Sundeep

1

There are 1 best solutions below

0
On

Try including custom context.xml inside webapps.

See these links for more info:

JBoss - possible to mount a war on two different context paths?

Tomcat context.xml files, is there a hiearchy?