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
Explain servlet life cycle?
What is lazy loading and what is Generic Servlet Class?
List the Different types of servlet?
Is servlet a framework?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
What is servlet and its life cycle?
What is the major difference between context parameter and context attribute?
Explain the servlet context.
What mechanisms are used by a Servlet Container to maintain session information?
What is java servlet session?
What is the procedure of invoking different servlet in a different application?
What is the
What is the difference between 2 types of servlets?
Differentiate between get and post?
What is servlet invoker?