阅读下面代码片段(其中login.jsp页面在WebContent目录下): Servlet1: request.setAttribute(com
已帮助 人
阅读下面代码片段(其中login.jsp页面在WebContent目录下): Servlet1: request.setAttribute("company", "北京播客教育有限公司"); RequestDispatcher dispatcher = request.getRequestDispatcher("login.jsp"); dispatcher.forward(request, response); login.jsp: <body> hello ${company} </body> 当使用浏览器访问Servlet1时会什么结果()。
A.页面跳转失败
B.页面结果显示为:hello ${company};
C.页面跳转错误,程序出现异常;
D.正常跳转,页面显示为:hello 北京播客教育有限公司

回答
共1条回复-
页面重定向到a.jsp页面
