题目内容

在Java Web中,HttpServletResponse的( )方法用于一个HTTP请求重定向到另一个资源。

A. sendURL()
B. sendRedirect()
C. forward()
D. redirectURL()

查看答案
更多问题

在JSP页面中进行访问控制时,一般会使用JSP的( )内置对象实现对用户的会话跟踪。

A. request
B. session
C. response
D. application

以下哪种格式是正确的URL( )。

A. http://localhost:8080/news/index.jsp
B. http://localhost/8080/news/index.jsp
C. http://localhost/8080:news/index.jsp
D. http:localhost://8080/news/index.jsp

在JSP中,以下( )方法可以正确获取复选框的值。

A. request.getParameterValue()
B. response.setParameterValues()
C. request.getParameterValues()
D. request.getParameter()

以下代码中( )可以正确设置客户端请求编码为UTF-8。

A. request.setCharacterEncoding("UTF-8")
B. request.setCharset("UTF-8")
C. request.setContentType("UTF-8")
D. request.setEncoding("UTF-8")

答案查题题库