Given the JSP code: <% request.setAttribute("foo", "bar"); %>and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()
第1题:
Given:11.<servlet>12.<servlet-name>catalog</servlet-name>13.<jsp-file>/catalogTemplate.jsp</jsp-file>14.<load-on-startup>10</load-on-startup>15.</servlet>Whichtwoaretrue?()
A.Line13isnotvalidforaservletdeclaration.
B.Line14isnotvalidforaservletdeclaration.
C.Oneinstanceoftheservletwillbeloadedatstartup.
D.Teninstancesoftheservletwillbeloadedatstartup.
E.Theservletwillbereferencedbythenamecataloginmappings.
第2题:
在J2EE中,在aa.jsp中有行代码: <%><% request.setAttribute("Co.","jb-aptech"); %> 在bb.jsp中有行代码: <% out.println((String)request.getAttribute("Co.")); %> <%> 为了使得在bb.jsp中的如上代码可以显示“jb-aptech”,可以使用()方法。
第3题:
Given the element from the web application deployment descriptor:
第4题:
JSP标准动作不包括()。
第5题:
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
第6题:
Which two are valid and equivalent?()
第7题:
Given the JSP code: 10. 11. 12.
第8题:
<%! int count = 0; %><% if ( request.getSession(false) == null ) count++; %>
<%@ int count = 0; %>. <% if ( request.getSession(false) == null ) count++; %>
<% int count = 0;. if ( request.getSession(false) == null ) count++; %>
<%@ int count = 0;. if ( request.getSession(false) == null ) count++; %>
<%! int count = 0;. if ( request.getSession(false) == null ) count++; %>
第9题:
<b></b>
<b>12</b>
The JSP fails to execute.
<% int i = 12 %><b><%= i %></b>
第10题:
Error
Exception
Throwable
Request error
Request exception
第11题:
<%> Welcome <% out.print(login.getName()); %>
Welcome <% writer.print(login.getName()); %>
Welcome <% response.out.print(login.getName()); %>
Welcome <% response.writer.print(login.getName()); %>
Welcome <% response.getOutputStream().write(login.getName()); %>
第12题:
The deployment descriptor is invalid.
The container invokes mainError.jsp.
The container invokes castError.jsp.
Neither mainError.jsp nor castError.jsp is invoked.
第13题:
A.<jsp:importfile=’foo.jsp’/>
B.<jsp:importpage=’foo.jsp’/>
C.<jsp:includepage=’foo.jsp’/>
D.<jsp:includefile=’foo.jsp’/>
第14题:
Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()
第15题:
Which JSP standard action can be used to import content from a resource called foo.jsp?()
第16题:
JSP页面包括以下哪些元素?()
第17题:
Given this fragment from a Java EE deployment descriptor: 341.
第18题:
A JSP page needs to set the property of a given JavaBean to a value that is calculated with the JSP page. Which three jsp:setProperty attributes must be used to perform this initialization?()
第19题:
Java code
Template text
Scripting code
Standard action
Expression language
第20题:
Java code
Template text
Scripting code
Standard action
Expression language
第21题:
Default costs 0.0
Default costs 49.95
Default costs 39.95
The Matrix costs 0.0
The Matrix costs 49.95
The Matrix costs 39.95
第22题:
<b></b>
<b>12</b>
The JSP fails to execute.
<% int i = 12 %><b><%= i %></b>
第23题:
Id
Val
Name
Param
Value
Property
第24题:
The deployment descriptor is invalid.
The container invokes mainError.jsp.
The container invokes castError.jsp.
Neither mainError.jsp nor castError.jsp is invoked.