Error
Exception
Throwable
Request error
Request exception
第1题:
Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated by the servlet to the JSP;furthermore, that JSP uses a custom tag and must also process this information. This information mustNOT be accessible to any other servlet, JSP or session in the webapp. How can you accomplish this goal?()
第2题:
Which is a benefit of precompiling a JSP page?()
第3题:
Which implicit object is used in a JSP page to retrieve values associated with
第4题:
在jsp中作用域由小到大的组合是()
第5题:
Given an HttpServletRequest request, which retrieves an object of type Account with an Id of “account”?()
第6题:
You are creating an error page that provides a user-friendly screen whenever a server exception occurs.You want to hide the stack trace, but you do want to provide the exception’s error message to the user sothe user can provide it to the customer service agent at your company. Which EL code snippet inserts thiserror message into the error page?()
第7题:
Account account = request.get Resource(”account”):
Account account = request.get Attribute (“account”):
Account account = request.get Parameter (account”):
Account account = (Account)request.getResource (“account”):
Account account = (Account) request.get Attribute (“account”):
Account account = (Account) request.get Paramter (“account”):
第8题:
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>
第9题:
<jsp:insert page=’${bodyURL}’ />
<jsp:insert file=’${bodyURL}’ />
<jsp:include page=’${bodyURL}’ />
<jsp:include file=’${bodyURL}’ />
<jsp:insert page=’<%= bodyURL %>’ />
第10题:
Add attributes to the session object.
Add attributes on the request object.
Add parameters to the request object.
Use the pageContext object to add request attributes.
Add parameters to the JSP’s URL when generating the request dispatcher.
第11题:
The session object must be declared explicitly.
The request and response objects are available implicitly.
The output stream is available through the implicit outStream object.
The servlet context is available through the implicit servletContext object.
The JspContext for the tag file is available through the implicit jspContext object.
第12题:
request page session application
page request session application
pageContext request session application
pageScope request sessionScope applicationScope
第13题:
For debugging purposes, you need to record how many times a given JSP is invoked before the user’ssession has been created. The JSP’s destroy method stores this information to a database. Which JSPcode snippet keeps track of this count for the lifetime of the JSP page?()
第14题:
所有异常的共同父类是()
第15题:
Which the two are concerning the objects available to developers creating tag files?()
第16题:
You have built your own light-weight templating mechanism. Your servlets, which handle each request,dispatch the request to one of a small set of template JSP pages. Each template JSP controls the layout ofthe view by inserting the header, body, and footer elements into specific locations within the template page.The URLs for these three elements are stored in request scoped variables called, headerURL, bodyURL,and footerURL, respectively. These attribute names are never used for other purposes. Which JSP codesnippet should be used in the template JSP to insert the JSP content for the body of the page?()
第17题:
下面哪些类可用于throw语句()
第18题:
Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
第19题:
Store the data in a public instance variable in the servlet.
Add an attribute to the request object before using the request dispatcher.
Add an attribute to the context object before using the request dispatcher.
This CANNOT be done as the tag handler has no means to extract this data.
第20题:
Error
Exception
Throwable
Request error
Request exception
第21题:
An Exception is thrown with no other output
followed by an Exception
Compilation fails due to an error on line 9
Compilation fails due to an error on line 14
第22题:
It avoids initialization on the first request.
It provides the ability to debug runtime errors in the application.
It provides better performance on the first request for the JSP page.
It avoids execution of the _jspService method on the first request.
第23题:
<%! 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++; %>
第24题:
Config
Request
Session
Application