aspose file tools*
The moose likes Tomcat and the fly likes For Tomcat 5.5.23 on Linux Gurus. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "For Tomcat 5.5.23 on Linux Gurus." Watch "For Tomcat 5.5.23 on Linux Gurus." New topic
Author

For Tomcat 5.5.23 on Linux Gurus.

Todd Baxter
Greenhorn

Joined: Sep 26, 2007
Posts: 18
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
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
No these are not in a different web-app. What I'm looking for is a way to do virtual mapping ala JRun style.

Something like

<virtual-mapping>
<resource-path>/pages</resource-path>
<system-path>/wherever/on/the/harddisk/pages</system-path>
</virtual-mapping>

This person's post is similar to what I'm asking.

http://marc.info/?l=tomcat-user&m=107791455306590&w=2
 
 
subject: For Tomcat 5.5.23 on Linux Gurus.
 
Similar Threads
Tomcat: problem with server.xml context
newbie: UNIX and Tomcat file permissions
upload via mgmt console corrupts war?
Install Axis2 1.4 on Linux CentOS
Ant war task and JSP tag files