• Post Reply Bookmark Topic Watch Topic
  • New Topic

getContext method in ServletContext  RSS feed

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

There is getContext("uripath") method in the ServletContext interface.

can anybody tell me how can we form the uripath to getContext method

thanks in advance
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html#getContext(java.lang.String)

If you don't already, you should have the JEE API bookmarked in your browser.
There is a link in my signature.
 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have seen that...

could you please give me an example

I am using websphere 6.1.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have an example.

Cross context communication is not covered in great detail in the servlet spec so the implementation, across containers is, at best, inconsistent. I do know that the API (link that I gave you) specifies that the context name must start with a forward slash.

The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.


I also know that, in Tomcat, this feature is disabled by default for security reasons and has to be configured to work.
[ September 13, 2007: Message edited by: Ben Souther ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!