多项选择题Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()

A.Every  tag must have at least one  tag.
B.A  tag can have many  tags.
C.A given  tag can apply to only one  tag.
D.A given  tag can contain from zero to many  tags.
E.It is possible to construct a valid  tag such that,for a given resource,no user rolescan access that resource.


您可能感兴趣的试卷

你可能感兴趣的试题

2.多项选择题Which two are true concerning the objects available to developers creating tag files?()

A.The session object must be declared explicitly.
B.The request and response objects are available implicitly.
C.The output stream is available through the implicit outStream object.
D.The servlet context is available through the implicit servletContext object.
E.The JspContext for the tag file is available through the implicit jspContext object.

3.单项选择题

You are creating a content management system (CMS) with a web application front-end. The JSP thatdisplays a given document in the CMS has the following general structure:
1. <%-- tag declaration --%>
2. <t:document>
...
11. <t:paragraph>... <t:citation docID=’xyz’ /> ...</t:paragraph> ...
99. </t:document>
The citation tag must store information in the document tag for the document tag to generate a referencesection at the end of the generated web page. The document tag handler follows the Classic tag model andthe citation tag handler follows the Simple tag model. Furthermore, the citation tag could also be embeddedin other custom tags that could have either the Classic or Simple tag handler model.
Which tag handlermethod allows the citation tag to access the document tag?()

A.public void doTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
B.public void doStartTag() {JspTag docTag = findAncestorWithClass(this, DocumentTag.class); ((DocumentTag)docTag).addCitation(this.docID);}
C.public void doTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }
D.public void doStartTag() {. Tag docTag = findAncestor(this, DocumentTag.class); . ((DocumentTag)docTag).addCitation(this.docID);. }

4.多项选择题

Given:
3.public class MyTagHandler extends TagSupport {
4.public int doStartTag() {
5.// insert code here
6.// return an int
7.}
8.// more code here
...
18.}
There is a single attribute foo in the session scope.
Which three code fragments,inserted independently atline 5,return the value of the attribute?()

A.Object o = pageContext.getAttribute("foo");
B.Object o = pageContext.findAttribute("foo");
C.Object o = pageContext.getAttribute("foo",PageContext.SESSION_SCOPE);
D.HttpSession s = pageContext.getSession();Object o = s.getAttribute("foo");

6.多项选择题

Click the Exhibit button.

A servlet sets a session-scoped attribute product with an instance of com.example.Product and forwards toa JSP.
Which two output the name of the product in the response?()

A.${product.name}
B.<jsp:getProperty name="product" property="name" />
C.<jsp:useBean id="com.example.Product" /><%= product.getName() %>
D.<jsp:getProperty name="product" class="com.example.Product" property="name" />

最新试题

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 is true about the web container request processing model?()

题型:单项选择题

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

题型:问答题

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.

题型:问答题

Which two are valid and equivalent?()

题型:多项选择题

A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()

题型:多项选择题

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?

题型:单项选择题

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

题型:问答题