GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  JSP
Go To First  |  Previous Question  |  Next Question 
 JSP  |  Question 278 of 308    Print  
What is the difference between page = ... > and response.sendRedirect(url),?
The element forwards the request
object containing the client request information from
one JSP file to another file. The target file can be
an HTML file, another JSP file, or a servlet, as long
as it is in the same application context as the
forwarding JSP file.
sendRedirect sends HTTP temporary redirect response to
the browser, and browser creates a new request to go
the redirected page. The response.sendRedirect kills
the session variables.



  
Total Answers and Comments: 1 Last Update: January 04, 2007     Asked by: abhinav_saraswat 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 04, 2007 06:57:30   
Sunil Kumar Yadav        

RE: What is the difference between
the first executes on server side and second executes on client side.
 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Difference 1:Action include allows us to specify an expression that resolves to the file path to include whereas directive include does not allows expression to specify file path.Difference 2:While including a static page using directive include(static ...

Latest Answer : Using a Bean in a JSP PageTo use a bean in a JSP page, three attributes must be supplied - an id, which provides a local name for the bean, the bean's class name, which is used to instantiate the bean if it does not exit, and a scope, which specifies ...

Latest Answer :  scriptelet are used to write the code in any language but that language is mentioned in page language attribute.ex://returns siva kumar expession are used to display the simple values and returning ...

Latest Answer : hi, We Can restrict page errors by using the two attributes of page directive i.e. error attribute set to true and then use the errorPage attributes that specifies the url of Error page.Thanks ...

Latest Answer : Hi guysthere are 3 ways to do this1) 2) response.sendredirect3)  forward methos of requestdispatcher ...

How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
One should be very careful when having JSP pages extend custom servlet classes as opposed to the default one generated by the JSP engine. In doing so, you may lose out on any advanced optimization that 

The following code snippet shows how a servlet instantiates a bean and initializes it with FORM data posted by a browser. The bean is then placed into the request, and the call is then forwarded to the 
Latest Answer : Hi Jose Kutty,Mr. Nanda is wrong. We can create RequestDespatcher object by two ways, either  by ServletRequest object       request.getRequestDispatcher("/abc.jsp");// here you need to mention relative path(or) ...

A cookie, mycookie, can be deleted using the following scriptlet: 
Latest Answer :  In First line, We are creating cookie object of cookie class,after that we are sending response to server.we make object which take null value and it, setting life 0, after that we cookie send token to server, with null value, and max age 0.then cookie ...

You can declare methods for use within your JSP page as declarations. The methods can then be invoked within any other methods you declare, or within JSP scriptlets and expressions.Do note that you do 

We know that session tracking uses cookies by default to associate a session identifier with a unique user. If the browser does not support cookies, or if cookies are disabled, you can still enable session 


 Sponsored Links

 
Related Articles

jQuery - Marking the Current Page

Learning jQuery Marking the Current Page Our pager can be made more user friendly by highlighting the current page number We just need to update the classes on the buttons every time one is clicked mosgoogle geshibot lang php" var pager ; for var page 0; page numPages; page pag
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

JSP Response Object

JSP Response Object In this JSP tutorial you will learn about JSP Response object Methods of response Object setContentType addCookie Cookie cookie containsHeader String name setHeader String name String value sendRedirect String and sendError int status code mosgoogle The response object denotes th
 

JSP Page Directive

JSP Page Directive In this JSP tutorial you will learn about JSP page directive attributes of the page directive along with syntax examples and explanations mosgoogle autoFlush autoFlush  attribute is used to specify whether or not to automatically flush out the output buffer when it is ful
 

How to use JavaScript in HTML page

How to use JavaScript in HTML page In this JavaScript tutorial you will learn how to use JavaScript in HTML page how to write output to a page different places where JavaScript can be paced in HTML JavaScript in external file and how to place and execute JavaScript in external file mosgoogle How to
 

Difference between Scholarship and Grant

Difference between Scholarship and Grant While both scholarships and grants allow students to pay for their tuition without having to pay the money back there are a number of key differences between the two Knowing the difference between grants and scholarship will make it much easier for students t
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape