We can give relative URL when we use ServletRequest and not while using ServletContext.:if u call request Dispatcher on servletRequest object it performs servlet chaining b/w source servlet and destination program wher they reside in the same web application.: The getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface accepts parameter the path to the resource to be included or forwarded to, which can be relative to the request of the calling servlet. If the path begins with a "/" it is interpreted as relative to the current context root.
Category:Servlet Interview Questions
No comments:
Post a Comment