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?()
第1题:
Youarebuildingyourownlayoutmechanismbyincludingdynamiccontentforthepage’sheaderandfootersections.Thefooterisalwaysstatic,buttheheadergeneratesthe<title>tagthatrequiresthepagenametobespecifieddynamicallywhentheheaderisimported.WhichJSPcodesnippetperformstheimportoftheheadercontent?()
A.<jsp:includepage=’/WEB-INF/jsp/header.jsp’><jsp:paramname=’pageName’value=’WelcomePage’/></jsp:include>
B.<jsp:importpage=’/WEB-INF/jsp/header.jsp’><jsp:paramname=’pageName’value=’WelcomePage’/></jsp:import>
C.<jsp:includepage=’/WEB-INF/jsp/header.jsp’><jsp:attributename=’pageName’value=’WelcomePage’/>.</jsp:include>
D.<jsp:importpage=’/WEB-INF/jsp/header.jsp’>.<jsp:attributename=’pageName’value=’WelcomePage’/>.</jsp:import>
第2题:
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>
第3题:
A、jsp:useBean
B、jsp:useBean.property
C、jsp:useBean.getProperty
D、jsp:getProperty
第4题:
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?()
第5题:
A.<jsp:importfile=’foo.jsp’/>
B.<jsp:importpage=’foo.jsp’/>
C.<jsp:includepage=’foo.jsp’/>
D.<jsp:includefile=’foo.jsp’/>
第6题:
A.<%!inti;%>
B.<%=inti;%>
C.<jsp:expr>inti;</jsp:expr>
D.<jsp:scriptlet>inti;</jsp:scriptlet>
E.<jsp:declaration>inti;</jsp:declaration>
第7题:
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>
第8题:
JSP EL表达式的语法为( )
A、!JSP expression
B、@{JSP expression}
C、${JSP expression}
D、#{JSP expression}
第9题:
有三个页面,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
第10题:
下列选项中不属于JSP标准动作的是()