<% 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} %>
第1题:
You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()
第2题:
You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the
第3题:
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?()
第4题:
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following code fragment. | English | Chinese | Japan | Korean | - 92 - Test Information Co., Ltd. All rights reserved.
第5题:
this.Init += new EventHandler(BindData);
this.PreRender += new EventHandler(BindData);
lstLanguages.PreRender += new EventHandler(BindData);
lstLanguages.SelectedIndexChanged += new EventHandler(BindData);
第6题:
A
B
C
D
第7题:
In the Web.config file, enable impersonation.
In IIS, enable anonymous access.
In IIS, disable anonymous access.
In the Web.config file, set the authentication mode to Windows.
第8题:
In the init method.
In the jspInit method.
In the constructor of the JSP’s Java code.
In a JSP declaration, which includes an initializer block.
In a JSP declaration, which includes a static initializer block.
第9题:
<% if ( request.isUserInRole(SalesManager) ) { %> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> <% } %>
<jsp:if test=’request.isUserInRole(SalesManager)’> <%@ include file=’/WEB-INF/html/sales-mgr-menu.html’ %> </jsp:if>
<% if ( request.isUserInRole(SalesManager) ) { %> . <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> . <% } %>
<jsp:if test=’request.isUserInRole(SalesManager)’> <jsp:include file=’/WEB-INF/html/sales-mgr-menu.html’ /> </jsp:if>
第10题:
within a method called jspInit
within the page directive of the JSP page
within a scriptlet at the top of the JSP page
within the
第11题:
<% 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} %>
第12题:
<%@ page isThreadSafe=’false’ %>
<%@ implements SingleThreadModel %>
<%! implements SingleThreadModel %>
<%@ page useSingleThreadModel=’true’ %>
<%@ page implements=’SingleThreadModel’ %>
第13题:
You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately,after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fixthese problems would require significant recoding, but you are already behind schedule. Which JSP codesnippet can you use to resolve these concurrency problems?()
第14题:
You are building JSP pages that have a set of menus that are visible based on a user’s security role. Thesemenus are hand-crafted by your web design team; for example, the SalesManager role has a menu in thefile /WEB-INF/html/sales-mgr-menu.html. Which JSP code snippet should be used to make this menuvisible to the user?()
第15题:
You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()
第16题:
In your test database, you find that a user’s session is executing a lot of SQL statements, resulting in the generation of a large number of trace files. While investigating the reason, you find that SQL trace has been enabled at the instance level. You want to disable SQL trace, remotely, only for that user session to reduce the volume of trace data being generated.How do you achieve this objective?()
第17题:
<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>
第18题:
Message: <b>${exception.message}</b>
Message: <b>${exception.errorMessage}</b>
Message: <b>${request.exception.message}</b>
Message: <b>${pageContext.exception.message}</b>
Message: <b>${request.exception.errorMessage}</b>
第19题:
by setting the SQL_TRACE parameter to FALSE in the parameter file
by using DBMS_MONITOR.SESSION_TRACE_DISABLE to disable the tracing for the user session
by setting the SQL_TRACE parameter to FALSE by using the ALTER SYSTEM command in the user session
by setting the SQL_TRACE parameter to FALSE by using the ALTER SESSION command in the user session
第20题:
<% List catalog = config.getAttribute(catalog); %>
<% List catalog = context.getAttribute(catalog); %>
<% List catalog = application.getAttribute(catalog); %>
<% List catalog = servletContext.getAttribute(catalog); %>
第21题:
Init
Load
PreInit
PreLoad
第22题:
<%! int count = 0; %><% if ( request.getSession(false) == null ) count++; %>
<%@ int count = 0; %>. <% if ( request.getSession(false) == null ) count++; %>
<% int count = 0;. if ( request.getSession(false) == null ) count++; %>
<%@ int count = 0;. if ( request.getSession(false) == null ) count++; %>
<%! int count = 0;. if ( request.getSession(false) == null ) count++; %>
第23题:
<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>
<jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
<jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert>
<jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>
第24题:
<jsp:declaration>int count = 0;<jsp:declaration>
<%! int count = 0; %>
<jsp:declaration.instance>int count = 0;. <jsp:declaration.instance>
<jsp:scriptlet.declaration>int count = 0;. <jsp:scriptlet.declaration>