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 global variable in javascript?

662


What is client side in javascript?

595


How do functions work in javascript?

642


How to count the number of element in an array using javascript?

738


What is event target in javascript?

651


Is JavaScript a true OOP language?

782


Is javascript frontend or backend?

627


Is javascript a dynamic language?

650


How to change style on an element?

718


Which software is best for javascript?

707


What is unobtrusive javascript?

665


What is 'use strict'?

683


Can you assign an anonymous function to a variable?

647


What is meant by vanilla javascript?

630


How to get the type of arguments passed to a function?

692