what is the source code for sendRedirect method()java
Servlet program?

Answer Posted / sunny

first,u have to use sendRedirect in form of JSP browserside.
<form method="POST"
action="/SendRedirect/SendRedirectServlet">

second in SendRedirectServlet, u have giving a response to
browser side
response.sendRedirect("/SendRedirect/ValidUserServlet");

it makes a request to one resource in server.
in server, gives response to browser. session is lost at a
time.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is npm repository?

535


How do I enable cookies and javascript?

553


List few difference between primitive and non primitive javascript data types?

589


What are javascript properties?

588


What is an object in javascript, give an example?

594






Difference json arrary vs json object ?

625


What are the features of javascript?

566


What can be the challenges during testing a program or a system?

1851


What is the best free ide?

558


List the comparison operators supported by javascript?

603


Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?

656


How to port a GUI application onto Web

1739


List out the Mouse Events?

627


What are the advantages of using external javascript?

550


How to load another html page from javascript?

622