servlet调用哪个方法响应HTTP请求,假设前端url为http://localhost/demo/ls?id=123
举一反三
- 员工编辑时,浏览器地址栏的URL地址为“http://localhost/friend_edit.aspx?Id=12” ,使用什么方法( )获取Id变量的值。
- 【单选题】假设web运行时根目录url为:http://localhost:8080/jsp2019,下面配置信息表示将ch10包中的RegisterServlet类映射后的url路径为() register ch10.RegisterServlet register /register/reg A. http://localhost:8080/jsp2019/reg.jsp B. http://localhost:8080/jsp2019/reg C. http://localhost:8080/jsp2019/register/reg D. http://localhost:8080/jsp2019/register/reg.jsp
- 在Servlet中使用语句“response.sendRedirect("test/main.jsp");”实现页面重定向时,如果当前Servlet位于为本机项目的test的子目录test中,则实际重定向的页面URL为( ) A: http://localhost:8080/main.jsp B: http://localhost:8080/test/main.jsp C: http://localhost:8080/test/test/main.jsp D: http://localhost:8080/test/test/test/main.jsp
- 你已部署了名为PTS的Web网站,在根目录下有login.jsp的页面。以下( )是访问页面的正确的方法。 A: http://localhost:8080/servlet/login.jsp B: http://localhost:8080/login.jsp C: http://localhost:8080/PTS/servlet/login.jsp D: http://localhost:8080/PTS/login.jsp
- Servlet中,HttpServletResponse的方法用来把一个Http请求重定向到另外的URL