题目内容

给定程序的片断如下,用户在浏览器地址栏中键入正确的请求URL并回车后,在控制台上显示的结果是( ) public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{ System.out.println(“get”); } Public void doPost(HttpServletRequest request,HttpServletResponse response) Throws ServletException,IOException{ System.out.println(“post”); }

A. get
B. post
C. get post
D. post get

查看答案
更多问题

假设本地服务器Tomcat(端口号8080)中名为helloapp的Web应用有一HelloServlet类,它位于cn.edu.cdut包下,它在web.xml文件中的配置如下: HelloServlet cn.edu.cdut.HelloServlet HelloServlet /hello 那么在浏览器端访问HelloServlet的URL是( )

A. http://localhost:8080/hello
B. http://localhost:8080/helloapp/HelloServlet
C. http://localhost:8080/helloapp/cn/edu/cdut/hello
D. http://localhost:8080/helloapp/hello

在JSP中,______ 指令用于将文件嵌入JSP页面。

在servlet中获取会话对象的方法是______ 。

request对象的getParameter方法的功能是______ 。

答案查题题库