You have been contracted to create a web site for a free dating service. One feature is the ability for oneclient to send a message to another client, which is displayed in the latter client’s private page. Your contract explicitly states that security is a high priority. Therefore, you need to prevent cross-site hacking inwhich one user inserts JavaScript code that is then rendered and invoked when another user views thatcontent.
Which two JSTL code snippets will prevent cross site hacking in the scenario above? ()
A.<c:out>${message}</c:out>
B.<c:out value=’${message}’ />
C.<c:out value=’${message}’ escapeXml=’true’ />
D.<c:out eliminateXml=’true’>${message}</c:out>
E.<c:out value=’${message}’ eliminateXml=’true’ />
您可能感興趣的試卷
你可能感興趣的試題
In a JSP-centric shopping cart application, you need to move a client’s home address of the Customerobject into the shipping address of the Order object. The address data is stored in a value object classcalled Address with properties for: street address, city, province, country, and postal code.
Which two JSPcode snippets can be used to accomplish this goal?()
A.<c:set var=’order’ property=’shipAddress’value=’${client.homeAddress}’ />
B.<c:set target=’${order}’ property=’shipAddress’value=’${client.homeAddress}’ />
C.<jsp:setProperty name=’${order}’ property=’shipAddress’ value=’${client.homeAddress}’ />
D.<c:set var=’order’ property=’shipAddress’><jsp:getProperty name=’client’ property=’homeAddress’ /> </c:store>
E.<c:set target=’${order}’ property=’shipAddress’><jsp:getProperty name=’client’ property=’homeAddress’ /> </c:set>
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>
You are developing several tag libraries that will be sold for development of third-party web applications.You are about to publish the first three libraries as JAR files: container-tags.jar,advanced-html-form-tags.jar, and basic-html-form-tags.jar.
Which two techniques are appropriate for packaging the TLD files forthese tag libraries?()
A.The TLD must be located within the WEB-INF directory of the JAR file.
B.The TLD must be located within the META-INF directory of the JAR file.
C.The TLD must be located within the META-INF/tld/ directory of the JAR file.
D.The TLD must be located within a subdirectory of WEB-INF directory of the JAR file.
E.The TLD must be located within a subdirectory of META-INF directory of the JAR file.
A.Authorization
B.Data integrity
C.Confidentiality
D.Authentication
A.Authorization
B.Data integrity
C.Confidentiality
D.Authentication
最新試題
Which is a benefit of precompiling a JSP page?()
Which ensures that a JSP response is of type "text/plain"?()
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 <title> tag that requires the page name tobe specified dynamically when the header is imported.Which JSP code snippet performs the import of theheader content?()
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?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface:public interface ApplicationController {public String invoke(HttpServletRequest request)}The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext.Which code snippet of the FrontController servlet accomplishes this goal?()
Click the ’Select and Place’ button.Place the events in the order they occur.
Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()
You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.Which JSP code snippet will create this array?()
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?()