多项选择题
在浏览器输入http://localhost:8080/news/main/list.jsp,分别执行下面向行代码后打印代码后,打印结果正确的是()
A.System.out.println(request.getContextPath());打印结果:/news
B.System.out.println(request.getServletPath());打印结果:/main/list.jsp
C.System.out.println(request.getRequestURI());打印结果:http://localhost:8080/news/main/list.jsp
D.System.out.println(request.getRequestURI());打印结果:/news/main/list.jsp
点击查看答案&解析
相关考题
-
多项选择题
下列可在下划线处插入并且能够正确输出WELCOME,BILL的语句有()
A.name
B.< %=name%>
C.out.println(name);
D.< %out.println(name);%> -
单项选择题
在Hibernate中,Java对象由持久化状态向游离状态转变的方法不包括Session的()方法。
A.save
B.clear
C.close
D.evict -
单项选择题
给定一个Servlet 的doGet方法中的代码片段,如下:request.setAttribute(“name”,”zhang”);response.sendRedirect(“http://localhost:8080/servlet/MyServlt”);那么在MyServlet 中可以使用()方法把属性name的值取出来。
A.String str=request.getAttribute(“name”);
B.String str=(String)request.getAttribute(“name”);
C.Object str=request.getAttribute(“name”);
D.无法取出来
