單項選擇題

After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file.
What do you need to do to reuse this tag library?()

A.Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.
B.Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.
C.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.
D.Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.


您可能感興趣的試卷

你可能感興趣的試題

2.多項選擇題Which three are valid URL mappings to a servlet in a web deployment descriptor?()

A.*/*
B.*.do
C.MyServlet
D./MyServlet
E./MyServlet/*
F.MyServlet/*.jsp

3.多項選擇題

Given the security constraint in a DD:
101.<security-constraint>
102.<web-resource-collection>
103.<web-resource-name>Foo</web-resource-name>
104.<url-pattern>/Bar/Baz/*</url-pattern>
105.<http-method>POST</http-method>
106.</web-resource-collection>
107.<auth-constraint>
108.<role-name>DEVELOPER</role-name>
109.</auth-constraint>
110.</security-constraint>
And given that "MANAGER" is a valid role-name,which four are true for this security constraint?()

A.MANAGER can do a GET on resources in the /Bar/Baz directory.
B.MANAGER can do a POST on any resource in the /Bar/Baz directory.
C.MANAGER can do a TRACE on any resource in the /Bar/Baz directory.
D.DEVELOPER can do a GET on resources in the /Bar/Baz directory.
E.DEVELOPER can do only a POST on resources in the /Bar/Baz directory.
F.DEVELOPER can do a TRACE on any resource in the /Bar/Baz directory.

4.單項選擇題

Given this fragment in a servlet:
23.if(req.isUserInRole("Admin")) {
24.// do stuff
25.}
And the following fragment from the related Java EE deployment descriptor:
812.<security-role-ref>
813.<role-name>Admin</role-name>
814.<role-link>Administrator</role-link>
815.</security-role-ref>
900.<security-role>
901.<role-name>Admin</role-name>
902.<role-name>Administrator</role-name>
903.</security-role>
What is the result?()

A.Line 24 can never be reached.
B.The deployment descriptor is NOT valid.
C.If line 24 executes, the user’s role will be Admin.
D.If line 24 executes, the user’s role will be Administrator.
E.If line 24 executes the user’s role will NOT be predictable.

5.多項選擇題

If you want to use the Java EE platform’s built-in type of authentication that uses a custom HTML page for authentication.
Which two statements are true?()

A.Your deployment descriptor will need to contain this tag: CUSTOM.
B.The related custom HTML login page must be named loginPage.html.
C.When you use this type of authentication, SSL is turned on automatically.
D.You must have a tag in your deployment descriptor that allows you to point to both a login HTML pageand an HTML page for handling any login errors.
E.In the HTML related to authentication for this application, you must use predefined variable names fort he variables that store the user and password values.

最新試題

Click the 'Select and Place' button.Place the events in the order they occur.

題型:問答題

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()

題型:多項選擇題

Which element of a web application deployment descriptor  element is required?()

題型:單項選擇題

A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()

題型:單項選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:問答題

Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()

題型:單項選擇題

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

題型:單項選擇題

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?()

題型:單項選擇題

Which two are valid and equivalent?()

題型:多項選擇題

Click the ’Select and Place’ button.Place the events in the order they occur.

題型:問答題