Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher in servletcontext

 
Thamarai kannan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi can any one give brief description with source for the following question

getRequestDispatcher(String path) of the ServletRequest interface cannot extend outside the current servlet context whereas getRequestDispatcher(String path) of the ServletContext can use the getContext(String uripath) method to obtain RequestDispatcher for resources in foreign contexts.
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using ServletContext.getContext() (for the getRequestDispatcher()) servlets can gain access to the resources in other contexts hosted in the same server. But with the ServletRequest.getRequestDispatcher() servlets get the access only to local resources inside the same context as the current request. Check the API for ServletContext.
 
Thamarai kannan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
k thanks alot...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic