What is the difference betweeen JSP forward and servlet forward methods?

Showing Answers 1 - 12 of 12 Answers

Annapareddy SrinivasRao

  • Dec 16th, 2005
 

Nothing is there in my views.....

Because Jsp internally converted as Servlet ,So there is no different between Jsp Forward and Servlet Forward.

If there is any than is plx send to me at srinivas.annapareddy@gmail.com

  Was this answer useful?  Yes

Ajit

  • Dec 28th, 2005
 

Srinivas, You are absolutely right. Since any JSP gets converted into an internal servlet at runtime before serving any request so it would act as if it was a servlet.

  Was this answer useful?  Yes

Durga Prasad

  • Jan 20th, 2006
 

JSP forward forwards the control to another resource available in the same web application on the same container..where as Servlet forward forwards the control to another resource available in the same web application or different web app on the same container....

  Was this answer useful?  Yes

uday

  • Feb 9th, 2006
 

Sorry to say durga!!

But the difference u stated is wrong.

response.sendRedirect(String URL) is the method used with intra-web app communication which do-not preserve the request and response objects.

where as both forward action of jsp and servlet's forward methods presere the request and response objects.

the only difference in my opinion is we cannot use JSP's forward action in servlet where as we can use the servlet's forward in JSP

Thanks and regards

uday shankar

  Was this answer useful?  Yes

raghava

  • Feb 21st, 2006
 

Both are same.Raghava

  Was this answer useful?  Yes

B.srinivasarao

  • Mar 3rd, 2006
 

Hi Friends

Some friends think there is no difference b/w jsp forward and servlet forward.

But there is difference b/w them ,that is By using jsp forward we can't forward

to another jsp page in another web application or in another web container.

but in case of servlet forward we can do it. if there is any questins on j2se,jdbc,servlets,jsp,jndi,java mail api,java bean , plz send that to my mail

id given below------>bora_srinivasarao@yahoo.co.in

                     okey  bayee............friends

                                keeps smiling and mailing

                              bora_srinivasarao@yahoo.co.in

  Was this answer useful?  Yes

Anirban Dutta

  • Mar 7th, 2006
 

A jsp forward can directly forward to any jsp,servlet,etc., by merely specifying the target's relative path. A servlet forward needs a response object(javax.servlet.ServletResponse) to forward the request and any modifications made. Both are otherwise very similiar. Both are executed by the application container and no code written after either will be executed.

regards,

Anirban.

  Was this answer useful?  Yes

Shirshendu

  • Mar 18th, 2006
 

ur statement that jsp:forward action cannot be forwarded to a servlet is wrong becoz it is possible by using the url-pattern we r using for that servlet.

  Was this answer useful?  Yes

Viresh

  • Apr 18th, 2006
 

well folks,i have heard about jsp forward but what is servlet forward........shouldn't it be RequestDispatcher forward.................

  Was this answer useful?  Yes

Pramod Mishra

  • May 3rd, 2006
 

Hi Guys,

There is no difference between jsp and servlet forward. both use request dispatcher. Jsp turns in to servlet and jsp:forward internally converted into the rd.forward(request, respone)

  Was this answer useful?  Yes

Nurugan P.C

  • Sep 16th, 2006
 

Hi,

   there is no difference b/w jsp forward and servlet forward

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions