File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes diff between forwad & include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "diff between forwad & include" Watch "diff between forwad & include" New topic
Author

diff between forwad & include

Kather Basha
Greenhorn

Joined: Apr 12, 2004
Posts: 20
can any one tell me in detail about the major diff between forwarding a request to a.jsp page or include the same a.jsp page :roll:
vidya archana
Ranch Hand

Joined: Oct 29, 2002
Posts: 36
hiii,

the main differrence is that if you use include then you can do with the request object after the include code .but this is not the case for forward
u cannot do anything after with the request object since the request has already been forwarded to the requested resource
Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
You can read this.


Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Afroz Ahmed
Ranch Hand

Joined: Jan 18, 2004
Posts: 64
Hi,

It is like.

I: The current JSP
YOU: The included/forwarded JSP

include: I am giving this job to you,Do the job and send me the results.I will include them in my program

forward: I am giving this job to you,Do the job,show output and whatever you want.I am not concerned with this now.



The value of an idea lies in the usage of it.
Kather Basha
Greenhorn

Joined: Apr 12, 2004
Posts: 20
Thanks Mr.Afroz. Pl keep in touch, i'm having many of these questions which i have been asked while in interview.

Originally posted by Mohd Afroz Ahmed:
Hi,

It is like.

I: The current JSP
YOU: The included/forwarded JSP

include: I am giving this job to you,Do the job and send me the results.I will include them in my program

forward: I am giving this job to you,Do the job,show output and whatever you want.I am not concerned with this now.

Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
Originally posted by Mohd Afroz Ahmed:
Hi,

It is like.

I: The current JSP
YOU: The included/forwarded JSP

include: I am giving this job to you,Do the job and send me the results.I will include them in my program

forward: I am giving this job to you,Do the job,show output and whatever you want.I am not concerned with this now.



Wow! Point very well made!
 
GeeCON Prague 2014
 
subject: diff between forwad & include