[opencms-dev] v6a3 accessing vfs jsps from other contexts

Jack Bakker jbakker at iable.ca
Fri Feb 18 17:08:35 CET 2005


apache -> mod_jk2 -> tomcat, postgresql
v6a3

I have existing struts apps in separate contexts and want to draw on jsp in
opencms for menu and breadcrumbs

In the tomcat server.xml host block I have multiple contexts, one of which
points to opencms

------

<Host name="www.domain.com" debug="0" appBase="" unpackWARs="true">
<Context path="" crossContext="true" docBase="webapps/main.domain.com"
debug="0"
reloadable="true" />
<Context path="/app2"  crossContext="true" docBase="webapps/app2.domain.com"
debug="0"
reloadable="true"/>
<Context path="/opencms" crossContext="true" docBase="webapps/opencms"
debug="0"
reloadable="true" />
<Realm   className="org.apache.catalina.realm.JNDIRealm" 
...
/>
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
</Host>

-------

The default context (app main.domain.com) just redirects to
/opencms/opencms/en/
All access requires authentication through the JNDIRealm. 

In a module's /elements, I have jsp for menu and breadcrumbs 

All is working fine, except now I want to access the jsp menu and
breadcrumbs from another context. 

1)
In app2 I tried using <c:import
url="http://www.domain.com/opencms/opencms/.../elements/menu.jsp"> I get a
error 401. I can't pass in the jsessionid of the app2 because this is a
different jsessionid from opencms. 

2)
In app2 I tried <c:import context="/opencms"
url="/WEB-INF/jsp/online/system/modules/.../menu.jsp"> but then the cms:link
stuff didn't work.

Ideas on how I might be able to do this ? 

(As an aside, I will be passing in parameters to the menu.jsp to set the
current page and current folder to whatever)


Thx.

Jack   





More information about the opencms-dev mailing list