Jump between pages Servlet development of JavaWeb

1. Explanations

      RequestDispatcher object is achieved by turning forward () method to achieve. RequestDispatcher () method is obtained by getRequestDispatcher HttpServletRequest. Parameters getRequestDispatcher () method must start with "/." Forward this application not only can jump to another Servlet, JSP page, you can also jump to another html file.

 

2. Specific Code

RequestDispatcher d = request.getRequestDispatcher("/x.do");

d.forward(request,response);

 

Guess you like

Origin www.cnblogs.com/hanxdblog/p/11027908.html