• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

For Tomcat 5.5.23 on Linux Gurus.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic