• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContext.getContext() question

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
While browsing throug the API for the ServletContext class i found the followig method :

ServletContext.getContext(String url) this method returns a ServletContext object for the url specified on the server.
The question is someone with an application on the same server as mine can easily access my ServletContext object by providing the url of my page.
What do you think???
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
khaled,
"In a security conscious environment, the servlet container may return null for a given URL." This is also given in the API doc

In tomcat i've tried to get the ServletContext for the another application running on the same server.The only thing i cud able to get was null.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic