A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()
第1题:
A.<jsp-property-group>.<url-pattern>*.jsp</url-pattern>.<permit-scripting>false</permit-scripting>.</jsp-property-group>
B.<jsp-config>.<url-pattern>*.jsp</url-pattern><permit-scripting>false</permit-scripting>.</jsp-config>
C.<jsp-config>.<url-pattern>*.jsp</url-pattern>.<scripting-invalid>true</scripting-invalid>.</jsp-config>
D.<jsp-property-group>.<url-pattern>*.jsp</url-pattern>.<scripting-invalid>true</scripting-invalid>.</jsp-property-group>
第2题:
A.<jsp:importfile=’foo.jsp’/>
B.<jsp:importpage=’foo.jsp’/>
C.<jsp:includepage=’foo.jsp’/>
D.<jsp:includefile=’foo.jsp’/>
第3题:
For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()
第4题:
Which JSP standard action can be used to import content from a resource called foo.jsp?()
第5题:
JSP标准动作不包括()。
第6题:
下列哪一项不属于JSP动作指令标记?()
第7题:
JSP页面包括以下哪些元素?()
第8题:
Which two are valid and equivalent?()
第9题:
<prefix:myTag a=foo b=bar c=baz />
<prefix:myTag attributes={foo,bar,baz} />
<prefix:myTag jsp:attribute a=foo b=bar c=baz />
<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>
第10题:
A
The echo tag handler must define the setAttribute (String key, String value) method
The
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface
第11题:
是开发者自己定义的tag,可以在JSP页面中使用
JSP中定制标记符,实质上就是以标记的形式封装了一个俱有独立功能的Java类
必须依靠TLD文件实现custom tag到实现类的映射
是某些厂商自己实现的JSP扩展
第12题:
<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:insert>
<jsp:include page=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
<jsp:include file=’/WEB-INF/jsp/header.jsp’>. ${pageTitle=’Welcome Page’}. </jsp:include>
<jsp:insert page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:insert>
<jsp:include page=’/WEB-INF/jsp/header.jsp’>. <jsp:param name=’pageTitle’ value=’Welcome Page’ /> . </jsp:include>
第13题:
Formanageabilitypurposes,youhavebeentoldtoadda"count"instancevariabletoacriticalJSP DocumentsothataJMXMBeancantrackhowfrequentthisJSPisbeinginvoked.WhichJSPcodesnippetmustyouusetodeclarethisinstancevariableintheJSPDocument?()
A.<jsp:declaration>intcount=0;<jsp:declaration>
B.<%!intcount=0;%>
C.<jsp:declaration.instance>intcount=0;.<jsp:declaration.instance>
D.<jsp:scriptlet.declaration>intcount=0;.<jsp:scriptlet.declaration>
第14题:
有三个页面,a.jsp,b.jsp和c.jsp,流程是:a.jsp->b.jsp->c.jsp,其中a.jsp中提交的数据要在c.jsp中访问,用最简单的方法 怎么做?注意不能放在session里
用隐藏表单域,即在b.jsp页面中用N个hidden把上一页面提交过来的信息保存下来,然后和当前一起提交,再到c.jsp里面获取
说明:尽量不要用session和少用session
第15题:
JavaBean可以通过相关jsp动作指令进行调用。下面哪个不是JavaBean可以使用的jsp动作指令?()
第16题:
下列对custom tags的论述哪个不正确()
第17题:
用于获取bean属性的动作是()。
第18题:
下面哪个不是JSP中和javabean相关的标记?()
第19题:
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
第20题:
〈jsp:userBean〉
〈jsp:include〉
〈jsp:setProperty〉
〈jsp:getProperty〉
第21题:
<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>
第22题:
Name of the custom control
Comments to describe the custom control
List of the controls that will make up this custom control
Application that will contain the custom control
第23题:
Store the data in a public instance variable in the servlet.
Add an attribute to the request object before using the request dispatcher.
Add an attribute to the context object before using the request dispatcher.
This CANNOT be done as the tag handler has no means to extract this data.