What is difference between Forward() and sendRedirect()
methode?
Answer Posted / venkat
forward() method send source prg to target web resource prg
in same web application.and use source and target web
resource prg are use same req,res objects so will use data
in target web resource prg.
rd.forward(req,res)
sendRedirect() method send source web resource prg to target
web resource prg in same webapplication or two different web
applications in same server or different servers.and this
method will not use same req,res objects so if you want to
send data source to target web resource prg use query
string.
r.sendRedirect("srv2"?a=10);
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is tomcat a servlet container?
Explain web container.
How would you create deadlock on your servlet?
When to use doget() and when dopost()?
How we can get ip address of client in servlet?
How to make sure a servlet is loaded at the application startup?
how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file
What is servlet api used for conneting database?
Write a simple servlet program to print the contents of html.
What is the difference between using getSession(true) and getSession(false) methods?
What if you need to span your transaction across multiple servlet invocations?
How does Cookies work in Servlets?
Why do we have servlet wrapper classes?
How can I send user authentication information while making URL Connection?
What is servlet and how it works?