A.Placing it in the /secure directory
B.Placing it in the /WEB-INF directory
C.Placing it in the /META-INF/secure directory
D.Creating a element within the deployment descriptor
您可能感興趣的試卷
你可能感興趣的試題
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.
A.ejb-ref
B.jdbc-ref
C.servlet-ref
D.resource-ref
E.javamail-ref
F.resource-env-ref
A.*/*
B.*.do
C.MyServlet
D./MyServlet
E./MyServlet/*
F.MyServlet/*.jsp
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.
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.
最新試題
Click the 'Select and Place' button.Place the events in the order they occur.
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?()
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?()
All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()
Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()
Which is a benefit of precompiling a JSP page?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the ’Select and Place’ button.Place the events in the order they occur.
You are building a web application with a scheduling component. On the JSP, you need to show the currentdate, the date of the previous week, and the date of the next week. To help you present this information,you have created the following EL functions in the ’d’ namespace: name: curDate; signature: java.util.DatecurrentDate() name: addWeek; signature: java.util.Date addWeek(java.util.Date, int) name: dateString;signature:java.util.String getDateString(java.util.Date)Which EL code snippet will generate the string for the previousweek?
In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()