session = response.getSession();
session = request.getSession();
session = request.getSession(true);
session = request.getSession(false);
session = request.getSession(jsessionid);
第1题:
Given an HttpServletRequest request and an HttpServletResponse response: 41.HttpSession session = null; 42.// insert code here 43.if(session == null) { 44.// do something if session does not exist 45.} else { 46.// do something if session exists47. } To implement the design intent,which statement must be inserted at line 42?()
第2题:
Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()
第3题:
在Servlet里,能正确获取session的语句是()。
第4题:
下列代码正确的是哪项?()
第5题:
Given that a scoped attribute cart exist only in a user’s session, which two, taken independently, ensure the scoped attribute cart no longer exists?()
第6题:
Given that a scoped attribute cart exists only in a user’s session, which two, taken independently, ensure the scoped attribute cart no longer exists?()
第7题:
public class Session implements Runnable, Clonable{ public void run ();public Object clone () ; }
public class Session extends Runnable, Cloneable { public void run() {/*dosomething*/} public Object clone() {/*make a copy*/} }
public abstract class Session implements Runnable, Clonable { public void run() {/*do something*/} public Object clone() {/*make a copy*/} }
public class Session implements Runnable, implements Clonable { public void run() {/*do something*/} public Object clone() {/*make a copy*/} }
第8题:
session = response.getSession();
session = request.getSession();
session = request.getSession(true);
session = request.getSession(false);
session = request.getSession(jsessionid);
第9题:
Enable the Do not allow client printer redirection Group Policy setting.
Disable the Do not allow client printer redirection Group Policy setting.
Enable the Do not set default client printer to be default printer in a session Group Policy setting.
Disable the Do not set default client printer to be default printer in a session Group Policy setting.
第10题:
${cart = null }
<c:remove var=”cart” />
<c:remove var=”${cart}” />
<c:remove var=”cart” scope=”session” />
<c:remove scope=”session”>cart</c:remove>
<c:remove var=”${cart}” scope=”session” />
<c:remove scope=”session”>${cart}</c:remove>
第11题:
<c:remove var=cart />
<c:remove var=${cart} />
<c:remove var=cart scope=session />
<c:remove scope=session>cart</c:remove>
<c:remove var=${cart} scope=session />
<c:remove scope=session>${cart}</c:remove>
第12题:
request page session application
page request session application
pageContext request session application
pageScope request sessionScope applicationScope
第13题:
Given the definition of MyServlet: 11.public class MyServlet extends HttpServlet { 12.public void service(HttpServletRequest request, 13.HttpServletResponse response) 14.throws ServletException, IOException { 15.HttpSession session = request.getSession(); 16.session.setAttribute("myAttribute","myAttributeValue"); 17.session.invalidate(); 18.response.getWriter().println("value=" + 19.session.getAttribute("myAttribute")); 20.} 21.} What is the result when a request is sent to MyServlet?()
第14题:
Your company runs Remote Desktop Services. You have a Remote Desktop Session Host (RD Session Host) server. You need to ensure that remote desktop users can prin t only to the printers that are installed on the RD Session Host server. What should you do?()
第15题:
DO业务的Session呼叫控制流程,包含以下哪几种()。
第16题:
HttpSession session=request.getSession(false)与HttpSession session = request.getSession(true)的区别()。
第17题:
You are building a Front Controller using a JSP page and you need to determine if the user’s session hasNOT been created yet and perform some special processing for this case. Which scriptlet code snippet willperform this test?()
第18题:
HttpSession session=request.getSession(true)
HttpSession session=request.getHttpSession(true)
HttpSession session=response.getSession(true)
HttpSession session=response.getHttpSession(true)
第19题:
An IllegalStateException is thrown at runtime.
An InvalidSessionException is thrown at runtime.
The string value=null appears in the response stream.
The string value=myAttributeValue appears in the response stream.
第20题:
HttpSession session = request.getSession();
HttpSession session = request.getSession(id);
HttpSession session = request.getSession(true);
HttpSession session = request.getSession(false);
HttpSession session = request.getSession(jsessionid);
第21题:
Enable the Do not allow client printer redirection Group Policy setting.
Disable the Do not allow client printer redirection Group Policy setting.
Enable the Do not set default client printer to be default printer in a session Group Policy setting.
Disable the Do not set default client printer to be default printer in a session Group Policy setting.
第22题:
没有区别
如果当前reqeust中的HttpSession 为null,当传入参数为空时,就创建一个新的Session,否则返回null
如果当前reqeust中的HttpSession 为null,当传入参数为true时,就创建一个新的Session,否则返回null
第23题:
<% if ( request.getSession(false) == null ) {// special processing} %>
<% if ( request.getHttpSession(false) == null ) {// special processing} %>
<% if ( requestObject.getSession(false) == null ) { // special processing} %>
<% if ( requestObject.getHttpSession(false) == null ) { // special processing} %>