• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getRequestDispatcher doubt

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello rancher,


The ServletContext.getRequestDispatcher method takes a String argument describing a path within the scope of the ServletContext. This path must be relative to the root of the ServletContext and begin with a '/'. The method uses the path to look up a servlet, using the servlet path matching rules, wraps it with a RequestDispatcher object, and returns the resulting object.
If no servlet can be resolved based on the given path, a RequestDispatcher is provided that returns the content for that path.

what does mean it?? If no servlet can be found by the specified, what does it return??



Thnaks


 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If no servlet can be resolved based on the given path, then a RequestDispatcher is provided ,that returns the content for that path.

content of the path, it means ContextPath, ServletPath, PathInfo etc??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic