what is sendredirect?
Answers were Sorted based on User's Feedback
Answer / ajay dhingra
opposite is rite.....
incase of forward the request parameter will also go with
the url.
incase of sendredirect all the parameter in the request will
be killed.
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jasjit singh
This is a client side reDirect.When a sendRedirect method
is invoked, it causes the web container to return to the
browser indicating that a new URL should be requested.
Because the browser issues a completely new request any
object that are stored as request attributes before the
redirect occurs will be lost.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sushila
while writing the sendRedirect, control is going back to
browser and browser is making request for target url. result
is not storing to any where, simply control is going to new
request. at that time parameter and argument is nullify.
so result is not available to new request. we can achieve
parameter values and arguments value through query stream.
basically sendRedirect is used for across the application
but within the same server.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sheetal sonare
For multiple server load balancer requires. And load balancer maintains the stickiness. subsequent request always goes to same server unless session/state is maintained by explicit server.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / shahnawaz sheikh
sendRedirect is used in JSP pages for transfering to any
other jsp page with all the request parameters intact with
the request.
While in case of forward the parameters are not send with
the request only the url is send for transferring to any
other jsp page.
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / jogandra singh
basically sendRedirect is used with same application or
other application on same server or other server.
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / mekala devi pollachi
we can use this sendredirect in servlets here session values
are passed to jsp pages
jsp-->servlet(sendredirct)-->jsp
example:
choice = "chioiceName";
String url = "Home.do" + "?choice=" + choice;
response.sendRedirect(url);
Is This Answer Correct ? | 0 Yes | 2 No |
what is predefined function in java?
What is the use of protected in java?
What is jit compiler in java?
How does the garbage collector works in java?
What is synchronization and why is it important in java programming?
How many types of gc are there in java?
What are the high-level thread states in java programming?
How do you use spaces in java?
What exactly is methodology?
I Have a class abstract with one abstract method, so that method should override in the subclass, but i dont want to override, if i am not override what will happen? If compilation will occur then i dont want to give compilation error, then what we need to do??? See the sample program. public abstract class AbstractExample { public abstract void sampleMethod(); } public class AbstractExampleImple extends AbstractExample { }
How do I print a “?
Can we call the constructor of a class more than once for an object?