单选题 Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()
${userName}
${cookie.userName}
${cookie.user.name}
${cookies.userName[0]}
单选题 Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()
HttpSession
ServletConfig
ServletContext
HttpServletRequest
HttpServletResponse
单选题 A developer is designing a web application that must support multiple interfaces, including: an XML web service for B2B HTML for web-based clients WML for wireless customers. Which designpattern provides a solution for this problem?()
Session Facade
Business Delegate
Data Access Object
Model-View-Controller
Chain of Responsibility
单选题 A developer is designing a web application that must support multiple interfaces,including: an XML web service for B2B HTML for web-based clients WML for wireless customers. Which designpattern provides a solution for this problem?()
Session Facade
Business Delegate
Data Access Object
Model-View-Controller
Chain of Responsibility
单选题 Given a portion of a valid Java EE web application’s directory structure:MyApp | |--Directory1 ||--File1.html| |--META-INF| |--File2.html| |--WEB-INF |--File3.html You want to know whether File1.html, File2.html,and/or File3.html is protected from direct access by yourweb client’s browsers. What statement is true?()
All three files are directly accessible.
Only File1.html is directly accessible.
Only File2.html is directly accessible.
Only File3.html is directly accessible.
单选题 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?()
<% 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} %>
单选题 You need to create a JavaBean object that is used only within the current JSP page. It must NOT beaccessible to any other page including those that this page might import. Which JSP standard action canaccomplish this goal?()
<jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
<jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
<jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
<jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />