Using SendRedirect() in Java Servlets
How to Redirect User from one page to another in Java ServletsHome sendRedirect is a method available in HttpServletResponse Interface, allows you to forward the response to another resou rce. Syntax: response. sendRedirect ( "path" ); A relative URL can be used as a path argument. Login. html <html> <head> <title></title> <meta http-equiv= "Content-Type" content= "text/html; charset=UTF-8" > </head> <body> <form name= "form1" method= "post" action= " SendRedirect " > Enter UserName:<input type=textbox name= "username" value= "" ><br> Enter Password:<input type=textbox name= "password" value= "" ><br> <input type=submit name= "Login" ><br> </form> </body> </html> The above form will take the user details and redirects ...