• 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

getContext of other web-apps on the server, for Tomcat 5.5.9

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am using Tomcat version 5.5.9, however the issue that I am encountering might not be specific to this version.

Here it goes, In my servlet I am trying to get access to another web-app on my server(the same tomcat server instance, it is not a clustered environment) using 'getContext' method of 'ServletContext' class, the 'contextURI' parameter of the method is correct. However, the method is always returning null.

According to the documentation of 'getContext' method, the container returns null if the web-app does not exist or if the container has decided to not give access to the method becuase of security concerns.However the web-app that I am trying to get access to does not have any security constraints at all.

So,
1) Is there some setting on Tomcat that needs to be configured for this to work, assuming that Tomcat is returning null because of security concerns?

2) Does this method work in clustered Tomcat environment at all?

Thanks in advance for your relevant responses
 
Stinging nettles are edible. But I really want to see you try to eat 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