aspose file tools*
The moose likes Servlets and the fly likes what is the difference b/w forward() and include() in RequestDispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "what is the difference b/w forward() and include() in RequestDispatcher" Watch "what is the difference b/w forward() and include() in RequestDispatcher" New topic
Author

what is the difference b/w forward() and include() in RequestDispatcher

Dhineshkumar raj
Greenhorn

Joined: Aug 06, 2007
Posts: 28
what is the difference b/w forward() and include() methods in RequestDispatcher class

Can any one tell me the clear definition an differences

DhineshKumar R
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9383
    
    2

forward () is used to forward the page to another page that you specify, with the same set of request and response references, whereas an include () includes the content of the page that you want to include.

what is not clear here?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
vidyasagar sree
Greenhorn

Joined: Mar 07, 2008
Posts: 1
Originally posted by Dhineshkumar raj:
what is the difference b/w forward() and include() methods in RequestDispatcher class

Can any one tell me the clear definition an differences

DhineshKumar R


in forward: if request and response transfer from one page to another, it will not return to previous page.
in include:if request and response transfer from one page to another, it will return to previous page by taking all information from second page .


regards<br />vidyasagar
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
This topic has been "beaten to death" here. Search the forums. You will find lots of discussion on it. It's also in the FAQ I think.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the difference b/w forward() and include() in RequestDispatcher