package mypack;
import javax.servlet.*;
import java.io.*;
public class DispatcherServlet extends GenericServlet
{
private static final long serialVersionUID = -927664542385240618L;
private String target="/hello.jsp";
public void service(ServletRequest request,ServletResponse response)throws ServletException,IOException{
String username=request.getParameter("username");
String password=request.getParameter("password");
request.setAttribute("USER", username);
request.setAttribute("PASSWORD", password);
ServletContext context=getServletContext();
RequestDispatcher dispatcher=context.getRequestDispatcher(target);
dispatcher.forward(request, response);
}
}