继承genericservlet的子类怎么跳转到jsp
1个回答
展开全部
servlet使用RequestDispatcherjsp页面 String url="/EShop.jsp"; ServletContext sc = getServletContext(); RequestDispatcher rd = sc.getRequestDispatcher(url); rd.forward(req, res); servlet重定向jsp并数据发送别JSP: request.setAttubute("messages",aaa); RequestDispatcher requestDispatcher=request.getRequestDispatcher("/jsp/testbean.jsp"); requestDispatcher.forward(request,response);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询