aspose file tools*
The moose likes Servlets and the fly likes forward and include of RequestDispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "forward and include of RequestDispatcher" Watch "forward and include of RequestDispatcher" New topic
Author

forward and include of RequestDispatcher

Suri Babs
Ranch Hand

Joined: Mar 27, 2003
Posts: 50
Difference between forward and include methods of RequestDispatcher?
Anyone please.
thanks in advance
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
With forward() you pass on the request to another Web component (servlet or JSP) and say "goodbye" to it. The second component will deal with it and either it or yet another one will be responsible to send the response.
With include(), it's like calling a subroutine to do something and then RETURN to where it was called from and the same component continues to process the request.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: forward and include of RequestDispatcher
 
Similar Threads
RequestDispatcher in JSP
forward() VS include()
filters - getting IllegalStateException
SCWCD exam: which methods should be known?
destination of ServletOutputStream()