Sharing jars (or modules) between web application contexts in Idea

I want to run two webapp contexts /foo and /bar inside of idea (i use Selena build 7065). I allow the contexts to access each other's servletContext by specifying crossContext="true" in the /META-INF/context.xml of each context.

Now, to do anything useful with this setup I need to ensure that both class loaders see the same dependencies (.jars). In a standalone Tomcat configuration I believe the standard way of doing this is to drop them in CATALINA_HOME/shared/lib.

First, this "standard way" does not seem to work when running the apps inside of Idea. Can I fix this?

Better still, can I accomplish the same thing some other way (without dropping things into my tomcat installation).

Or even better, can I configure /foo and /bar to share a Java module in Idea in such a way that cross context access will work?

Thanks in advance,
- Torsten

0

Please sign in to leave a comment.