session.getResource(/WEB-INF/myconfig.xml)
request.getResource(/WEB-INF/myconfig.xml)
context.getResource(/WEB-INF/myconfig.xml)
getClass().getResource(/WEB-INF/myconfig.xml)
第1题:
GivenanHttpServletRequestrequestandanHttpServletResponseresponse:41.HttpSessionsession=null;42.//insertcodehere43.if(session==null){44.//dosomethingifsessiondoesnotexist45.}else{46.//dosomethingifsessionexists47.}Toimplementthedesignintent,whichstatementmustbeinsertedatline42?()
A.session=response.getSession();
B.session=request.getSession();
C.session=request.getSession(true);
D.session=request.getSession(false);
E.session=request.getSession("jsessionid");
第2题:
下列操作Session时,代码错误的是()
第3题:
A.session.dispose()
B.session.clear()
C.session.invalidate()
D.session.removeAll()
第4题:
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?()
第5题:
HttpSession与Hibernate中Session的区别
第6题:
Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here 26.} Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
第7题:
如果不希望JSP网页支持Session,应该如何办?()
第8题:
在jsp页面声明中定义了一个方法,下列( )代码不能放入该方法中
public void test(HttpServletReqeust request)
{
}
A、HttpSession session =request.getSession();
B、String name=(String)request.getAttribute("name");
C、String name=(String)session.getAttibute("name");
D、request.sendRedirect(“index.jsp”);
第9题:
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?()
第10题:
在jsp中作用域由小到大的组合是()