I need to be able to serve JSPs of a webapp from within a war as well as outside of it. Some JSPs which are core are part of the war and some JSPs which are customer driven (and have nothing to do with core) are deployed in a different directory. However, I want to be able to access those external JSPs seamlessly just like I'm accessing the JSPs in the war.
Is there a trick I can use to make Tomcat 5.5.23 (on Linux) to make Tomcat serve JSPs from this external directory. I have looked at the allowLinking feature of the <Context> but can't quite get to work.
Tarun Yadav
Ranch Hand
Joined: Sep 20, 2007
Posts: 134
posted
0
Originally posted by Todd Baxter: I need to be able to serve JSPs of a webapp from within a war as well as outside of it. Some JSPs which are core are part of the war and some JSPs which are customer driven (and have nothing to do with core) are deployed in a different directory. However, I want to be able to access those external JSPs seamlessly just like I'm accessing the JSPs in the war.
Is there a trick I can use to make Tomcat 5.5.23 (on Linux) to make Tomcat serve JSPs from this external directory. I have looked at the allowLinking feature of the <Context> but can't quite get to work.
Are these other JSPs you mention in another webapp? Because I don't know how else it would work. So, you need cross context access? You can set the crossContext attribute of <Context> equal to "true".
Then, you can get the other webapp's context with a call to getServletContext("/myOtherApp") and work with that.
Todd Baxter
Greenhorn
Joined: Sep 26, 2007
Posts: 18
posted
0
No these are not in a different web-app. What I'm looking for is a way to do virtual mapping ala JRun style.