-
Which is a benefit of precompiling a JSP page?()
A . It avoids initialization on the first request.
B . It provides the ability to debug runtime errors in the application.
C . It provides better performance on the first request for the JSP page.
D . It avoids execution of the _jspService method on the first request.
-
Which method of the Page class searches the page naming container for a server control with a particular identifer?()
A . FindFieldTemplate
B . FindControl
C . FindDataSourceControl
D . FindDataControl
-
Given in a single JSP page: <%@ taglib prefix=’java’ uri=’myTags’ %> <%@ taglib prefix=’JAVA’ uri=’moreTags’ %> Which two are true?()
A . The prefix ’java’ is reserved.
B . The URI ’myTags’ must be properly mapped to a TLD file by the web container.
C . A translation error occurs because the prefix is considered identical by the web container.
D . For the tag usage
-
Every page of your web site must include a common set of navigation menus at the top of the page. Thismenu is static HTML and changes frequently,so you have decided to use JSP’s static import mechanism. Which JSP code snippet accomplishes this goal?()
A . <%@ import file=’/common/menu.html’ %>
B . <%@ page import=’/common/menu.html’ %>
C . <%@ import page=’/common/menu.html’ %>
D . <%@ include file=’/common/menu.html’ %>
E . <%@ page include=’/common/menu.html’ %>
-
A session-scoped attribute is stored by a servlet, and then that servlet forwards to a JSP page. Which threejsp:useBean attributes must be used to access this attribute in the JSP page?()
A . id
B . name
C . bean
D . type
E . scope
-
A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()
A . Id
B . Val
C . Name
D . Param
E . Value
F . Property
-
https://assets.asklib.com/images/image2/2018073111182193973.jpgAssuming the tag library in the exhibit is imported with the prefix forum, which custom tag invocation produces a translation error in a JSP page?()
A . A
B . B
C . C
D . D
E . E
-
You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do?()
A . SetPage.MasterPageFile in the Page’sPage_Initevent.
B . SetPage.MasterPageFile in the Page’sOnInit event.
C . SetPage.MasterPageFile in the Page’sPage_Loadevent.
D . SetPage.MasterPageFile in the Page’sPage_PreInitevent.
-
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?()
A . <jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
B . <jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
C . <jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
D . <jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />
-
在JSP中page指令(〈%@ page %〉)里的()属性是可以重复的?
A、language
B、import
C、session
D、info
-
The sections of an Oil Record Book proceeding the log pages contain a ().
A . damage control plan for isolating fire main valves
B . list of machinery space operation items
C . complete classification of hazardous materials
D . detailed listing of all organizations to call in the event of an accidental oil spill
-
Which implicit object is used in a JSP page to retrieve values associated with entries inthe deployment descriptor?()
A . Config
B . Request
C . Session
D . Applicatio
-
A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()
A . id
B . type
C . name
D . class
E . scope
F . create
-
You create a Web page that contains the span shown in the following line of code. TextYou need replace the contents of the span with HTML that you download from a URL specified by a global variable named localURL. Which code segment should you use?()
A . $.ajax({ type: "GET", url: localURL, dataType: "jsonp", success: function(htmlText { $("#span1").text(htmlText); } });
B . $.ajax( localURL, {}, function(htmlText) { $("#span1").html(htmlText); },"html" );
C . $.ajax({ type: "GET", url: localURL, dataType: "html",success: function(htmlText) { $("#span1").innerHTML = htmlText; }});
D . $.ajax({ type: "GET", url: localURL, success: function(htmlText) { $("#span1").html(htmlText); } })
-
The JSP developer wants a comment to be visible in the final output to the browser. Which comment styleneeds to be used in a JSP page?()
A . <!-- this is a comment -->
B . <% // this is a comment %>
C . <%-- this is a comment --%>
D . <% /** this is a comment **/ %>
-
A JSP page needs to perform some operations before servicing the first request. Where can this be done?()
A . within a method called jspInit
B . within the page directive of the JSP page
C . within a scriptlet at the top of the JSP page
D . within the
-
You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()
A . Set Page.MasterPageFile in the Page's Page_Init event.
B . Set Page.MasterPageFile in the Page's OnInit event.
C . Set Page.MasterPageFile in the Page's Page_Load event.
D . Set Page.MasterPageFile in the Page's Page_PreInit event.
-
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?()
A . In the init method.
B . In the jspInit method.
C . In the constructor of the JSP’s Java code.
D . In a JSP declaration, which includes an initializer block.
E . In a JSP declaration, which includes a static initializer block.
-
In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored asa List object in the catalog attribute of the webapp’s ServletContext object. Which scriptlet code snippetgives you access to the catalog object?()
A . <% List catalog = config.getAttribute("catalog"); %>
B . <% List catalog = context.getAttribute("catalog"); %>
C . <% List catalog = application.getAttribute("catalog"); %>
D . <% List catalog = servletContext.getAttribute("catalog"); %>
-
A custom tag is defined to take three attributes. Which two correctly invoke the tag within a JSP page?()
A . <prefix:myTag a="foo" b="bar" c="baz" />
B . <prefix:myTag attributes={"foo","bar","baz"} />
C . <prefix:myTag jsp:attribute a="foo" b="bar" c="baz" />
D . <prefix:myTag><jsp:attribute name="a">foo</jsp:attribute><jsp:attribute name="b">bar</jsp:attribute><jsp:attribute name="c">baz</jsp:attribute>. </prefix:myTag>
-
Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()
A . Error
B . Exception
C . Throwable
D . Request error
E . Request exceptio
-
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?()
A . <% if ( request.getSession(false) == null ) {// special processing} %>
B . <% if ( request.getHttpSession(false) == null ) {// special processing} %>
C . <% if ( requestObject.getSession(false) == null ) { // special processing} %>
D . <% if ( requestObject.getHttpSession(false) == null ) { // special processing} %>
-
You need to create a servlet filter that stores all request headers to a database for all requests to the webapplication’s home page "/index.jsp". Which HttpServletRequest method allows you to retrieve all of therequest headers?()
A . String[] getHeaderNames()
B . String[] getRequestHeaders()
C . java.util.Iterator getHeaderNames()
D . java.util.Iterator getRequestHeaders()
E . java.util.Enumeration getHeaderNames()
-
Certkiller .com‘s e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()
A.Move the Products.aspx page to the App_Code folder.
B.Create a code-behind file for the Products.aspx page.
C.Rename the Products.aspx page to Products.ascx..
D.Remove all server controls from the Products.aspx page.
E.Replace the Page directive with a Control directive.