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
Describe some assignments that are executed by servlet container?
What are the different session tracking techniques?
Is servlet synchronized?
What are sessions in servlets?
How can we upload the file to the server using servlet?
Define servlet mapping?
What is http servlet? Explain with the help of an example.
How to create war file?
How to rectify errors in java servlet while compilation?
Which event is fired at the time of setting, getting or removing attribute from application scope?
How a servlet is unloaded?
What is cookie? Why is cookie used?
Can you refresh servlet in client and server-side automatically?
What are the types of Session Tracking ?
What's the difference between servlets and applets?