Quiz
Questões - Simple Tags
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (16)
1Which of the following methods are not immediately available to a SimpleTagSupport subclass?
- AgetJspBody();
- BgetJspContext().getAttribute("name");
- CgetParent();
- DgetBodyContent();
2What method should you use in a SimpleTag tag handler to access dynamic variables?
- AdoTag()
- BsetDynamicAttribute()
- CgetParent()
- DsetDynamicParameter()
3Which object does a SimpleTag tag handler use to access implicit variables?
- APageContext
- BBodyContent
- CJspContext
- DSimpleTagSupport
4Consider the following TLD excerpt:
<body-content>
empty
</body-content>
<attribute>
<name>color</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<dynamic-attributes>
true
</dynamic-attributes>
If the name of the tag is tagname and its prefix is pre, which of the following JSP statements is valid?- A<pre:tagname color="yellow" size=${sizenum} />
- B<pre:tagname size="18" color="red"> </pre:tagname>
- C<pre:tagname color="${colorname}" size="22" font="verdana"></pre:tagname>
- D<pre:tagname color="green" size="30">font="Times New Roman"</pre:tagname>
- E<pre:tagname color="${colorname}" size="18"></pre>
5If placed inside the body of a simple tag, which of the following statements won’t produce “9”? (Select one)
- A${3 + 3 + 3}
- B"9"
- C<c:out value="9">
- D<%= 27/3 %>
6Which of the following methods need to be invoked in a SimpleTag to provide iterative processing? (Select one)
- AsetDynamicAttribute()
- BgetParent()
- CgetJspBody()
- DdoTag()
- EgetJspContext()
7Which of the following values is invalid inside a SimpleTag’s <body-content> subelement? (Select one)
- AJSP
- Bscriptless
- Ctagdependent
- Dempty
8Which of the following is a valid return value for the SimpleTag’s doTag() method? (Select one)
- AEVAL_BODY_INCLUDE
- BSKIP_BODY
- Cvoid
- DEVAL_PAGE
- ESKIP_PAGE
9Which tag file directive makes it possible to process dynamic attributes?
- Ataglib
- Bpage
- Ctag
- Dattribute
10Which of the following statements can’t be used to access a tag file from a JSP? (Select one)
- A<%@ taglib prefix="pre" uri="www.mysite.com/dir/" %>
- B<%@ taglib prefix="pre" tagdir="/WEB-INF/tags" %>
- C<%@ taglib prefix="pre" tagdir="/WEB-INF/tagfiles" %>
- D<%@ taglib prefix="pre" tagdir="/WEB-INF/tags/myDirectory" %>
11Which tag file action processes JspFragments in tag attributes?
- Ataglib
- Bjsp:invoke
- Ctag
- Djsp:doBody
- Eattribute
12Which JspFragment method is used to process body content in a SimpleTag? (Select one)
- Ainvoke()
- BgetOut()
- CgetJspContext()
- DgetBodyContent()
13Which class provides an implementation of the doTag() method? (Select one)
- ATagSupport
- BBodyTagSupport
- CSimpleTagSupport
- DIterationTagSupport
- EJspTagSupport
14In what directory shouldn’t you place tag files? (Select one)
- A/META-INF/tags/tagfiles
- B/WEB-INF/
- C/WEB-INF/tags/tagfiles/tagdir/taglocation
- D/META-INF/tags/
15Which type of object is returned by JspContext.getOut()? (Select one)
- AServletOutputStream
- BHttpServletOutputStream
- CJspWriter
- DBodyContent
16Which of the following methods does the web container call first to initiate a SimpleTag’s life cycle?
- AsetJspContext()
- BsetParent()
- CgetJspContext()
- DgetJspBody()
- EgetParent()
Information
- Description
- Concursos Públicos Desenvolvimento de Software (OCEJWCD 6 ONLINE COURSE) Quiz on Questões - Simple Tags, created by Luis Felipe Guariento on 15/03/2018.
- Author
- Luis Felipe Guariento
- Language
- Português
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz