<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Difference between ServletRequest.getRequestDispatcher and ServletContext.getRequestDispatcher</title>
	<atom:link href="http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/feed/" rel="self" type="application/rss+xml" />
	<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/</link>
	<description>Blog on core java, servlets, jsp and design patterns.</description>
	<lastBuildDate>Mon, 04 Jun 2012 02:04:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Joe</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-11939</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Sun, 13 May 2012 18:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-11939</guid>
		<description>@Ankur, yes thats bad, I will fix the alignment quickly.</description>
		<content:encoded><![CDATA[<p>@Ankur, yes thats bad, I will fix the alignment quickly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ankur</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-11930</link>
		<dc:creator>ankur</dc:creator>
		<pubDate>Sun, 13 May 2012 11:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-11930</guid>
		<description>Hi Joe,

A lot of Title content here is  overlapped with explanation which makes it difficult to read. Can you please do something with it.</description>
		<content:encoded><![CDATA[<p>Hi Joe,</p>
<p>A lot of Title content here is  overlapped with explanation which makes it difficult to read. Can you please do something with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangeetha</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10719</link>
		<dc:creator>Sangeetha</dc:creator>
		<pubDate>Tue, 20 Mar 2012 16:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10719</guid>
		<description>The difference between ServletRequest.getRequestDispatcher(String path) and ServletContext.getRequestDispatcher(String path) is that the former can accept a relative path as well whereas the latter can accept paths relative to the current context root only.

If the path starts with a &#039;/&#039; in the getRequestDispatcher(String path) of the ServletRequest interface then it&#039;s interpreted as being relative to the current context root otherwise it&#039;ll be a relative to the request of the calling servlet. Whereas, the path of the getRequestDispatcher(String path) of the ServletContext interface must start with &#039;/&#039; only - being relative to the current context root.

Another difference between the two is that path of the 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.</description>
		<content:encoded><![CDATA[<p>The difference between ServletRequest.getRequestDispatcher(String path) and ServletContext.getRequestDispatcher(String path) is that the former can accept a relative path as well whereas the latter can accept paths relative to the current context root only.</p>
<p>If the path starts with a &#8216;/&#8217; in the getRequestDispatcher(String path) of the ServletRequest interface then it&#8217;s interpreted as being relative to the current context root otherwise it&#8217;ll be a relative to the request of the calling servlet. Whereas, the path of the getRequestDispatcher(String path) of the ServletContext interface must start with &#8216;/&#8217; only &#8211; being relative to the current context root.</p>
<p>Another difference between the two is that path of the 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.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alwar</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10657</link>
		<dc:creator>alwar</dc:creator>
		<pubDate>Sun, 18 Mar 2012 02:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10657</guid>
		<description>Its not clear</description>
		<content:encoded><![CDATA[<p>Its not clear</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10545</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 12 Mar 2012 16:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10545</guid>
		<description>I am not getting how to give another context path to getServletContext().getRequestDispatcher(path).

firstly can we call forward on another application.if i have two applications  i want to call resource of one application to another application.</description>
		<content:encoded><![CDATA[<p>I am not getting how to give another context path to getServletContext().getRequestDispatcher(path).</p>
<p>firstly can we call forward on another application.if i have two applications  i want to call resource of one application to another application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://javapapers.com/servlet/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10496</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 09 Mar 2012 10:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://javapapers.com/servlet-interview-questions/difference-between-servletrequestgetrequestdispatcher-and-servletcontextgetrequestdispatcher/#comment-10496</guid>
		<description>Can you have a look at this page. Text are overriden</description>
		<content:encoded><![CDATA[<p>Can you have a look at this page. Text are overriden</p>
]]></content:encoded>
	</item>
</channel>
</rss>

