jump to navigation

Difference between getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface and javax.servlet.ServletContext interface September 11, 2006

Posted by Allu in J2EE.
trackback

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.

The getRequestDispatcher(String path) method of javax.servlet.ServletContext interface cannot accepts relative paths. All path must start with a “/” and are interpreted as relative to current context root.

Advertisements

Comments»

1. Amit Singh,Pune - December 25, 2006

What is diff between HttpServletRequest and HttpRequest

2. karan - December 2, 2009

HttpServletRequest is an interface ,extends ServletRequest interface which provide the doGet,doPost methods & HttpRequest is the request parameter which is passed in the methods whose significance is to present the request passed by client.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: