阅读下面代码片段: Servlet1: request.setAttribute("name", "zhangsan"); RequestDispatcher dispatcher = request.getRequestDispatcher("/ResultServlet"); dispatcher.forward(request, response); response.getWriter().write("over"); Servlet2: response.setContentType("text/html;charset=utf-8"); String name = (String) request.getAttribute("name "); response.getWriter().println("名称:" + name); 先使用浏览器访问Servlet1,然后将Servlet1中的forward()方法更改为include()方法再次访问Servlet1,两者输出情况的描述正确的是( )。
阅读下面代码片段: Servlet1: request.setAttribute("name", "zhangsan"); RequestDispatcher dispatcher = request.getRequestDispatcher("/ResultServlet"); dispatcher.forward(request, response); response.getWriter().write("over"); Servlet2: response.setContentType("text/html;charset=utf-8"); String name = (String) request.getAttribute("name "); response.getWriter().println("名称:" + name); 先使用浏览器访问Servlet1,然后将Servlet1中的forward()方法更改为include()方法再次访问Servlet1,两者输出情况的描述正确的是( )。
1