ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Servlets
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
difference between forward and sendredirect
 Question Submitted By :: Vijayk
I also faced this Question!!     Rank Answer Posted By  
 
  Re: difference between forward and sendredirect
Answer
# 1
FORWARD-->
1. THE REQUEST AND RESPONSE OBJECT REMAIN SAME.
2. CONTROL DIRECTLY GOES TO REQUESTED PAGE AT THE POINT 
WHERE FORWARD IS CALLED.
3. REQUEST DISPATCHER IS NEEDED.

SEND REDIRECT:--->
1.NEW REQUEST AND RESPONSE IS GENERATED IN CASE THIS CASE.
2.IN THIS CASE FIRST CONTROL GOES TO CLIENT(BROWSER) AND 
THEN TO REQUESTED PAGE.
3.JUST RESPONSE OBJECT IS NEEDED.
 
Is This Answer Correct ?    11 Yes 0 No
Neeraj_passion2001
[SOWSIA INDIA PVT LTD]
 
  Re: difference between forward and sendredirect
Answer
# 2
If I am not wrong,
forward() is used to transfer the request within the web 
application whereas sendRedirect() is used to transfer the 
request from one webapplication to another.
 
Is This Answer Correct ?    3 Yes 0 No
Uv
 
 
 

 
 
 
Other Servlets Interview Questions
 
  Question Asked @ Answers
 
How to run a servlet program?  2
when the webcontainer creates ServeletConfig,ServletContext objects? befoure creating the Servlet object or not? TCS2
Why setMaxAge() and getMaxAge() methods are used in Cookies?  2
Explain in detail about applet to servlet communication?  1
What is servlet? Siemens11
Is there any need to shutdown the web server, if you want to modify a servlet?  2
can it possible to validate form field before execution of a servlet service method if yes how??  3
how can you give alias to servlets?  1
What is a Proxy Server?  1
What are different types of SessionTracking?  2
Is it possible to call servlet with parameters in the URL?  2
What advantages do servlets have over CGI programs?  3
What is the role of the webserver?  3
What is HTTP Session ?  1
In servlets, Why do we need both GET and POST method implementations? IBM3
What are the difference between HttpServlet and GenericServlets?  1
Can we use javascript in Servlets? Wipro1
Difference between Include, Forward and sendRedirect in Servlet? AZTEC3
What is the ServletConfig() and what is its use?  2
difference between forward and sendredirect Accenture2
 
For more Servlets Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com