tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritchie Gillam" <gill...@halifax.ca>
Subject Re: How to share static content across applications
Date Fri, 16 Sep 2005 11:38:48 GMT
Hassan

Ok, I understand so where do I put the reference to the shared asset Context?

I cannot put it in server.xml.   Let's say I put want to put the reference in an application
called app2, that would work fine expect I already have a <Context> element defined
in context.xml for the app2 application.

The only place I am left with is creating a context.xml in the "shared app" itself.   This
is also a problem since I have more that one "virtual directory"

For example:

I need the following entries:

<Context docBase="/data0.../webapps/sharedHRM path="/sharedHRM"/>

and then one entry for each application that references the shared assets like this:

<Context docBase="/data0.../webapps/sharedHRM path="/app1/sharedHRM"/>
<Context docBase="/data0.../webapps/sharedHRM path="/app2/sharedHRM"/>

I am doing this because sometimes the JSP/JSF tag appends the application context and sometimes
it don't.

Do you see what I mean?  I could be totally missing the boat and I apologize if that is the
case.

Thanks,





Ritchie Gillam
Programmer Analyst, Information Services, Halifax Regional Municipality
Email: gillamr@halifax.ca
Phone: (902) 490-6167
Fax: (902) 490-6583

>>> hassan@webtuitive.com 09/15/05 4:46 pm >>>
Ritchie Gillam wrote:
> In the applications that need the shared assets, I already have 
 > a <Context> defined in the context.xml file for each app and
 > I can only have the one.

? An "application" *is* a Context; the point is to create a single
"shared asset" Context and reference it from wherever. As below...

> Use either of e.g.
>    ${appBase}/assests/META-INF/context.xml
>      or
>    $CATALINA_HOME/conf/${hostname}/assets.xml

-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com 
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com 

                           dream.  code.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message