CMS专题

多选题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?()AIdBValCNameDParamEValueFProperty

题目
多选题
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?()
A

Id

B

Val

C

Name

D

Param

E

Value

F

Property

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

在JSP页面中,正确引入JavaBean的是()  

  • A、<%jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” %>  
  • B、<jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” >  
  • C、<jsp: useBean id =”myBean” scope =”page” class=”pkg.MyBean” /> 
  • D、<jsp: useBean name=”myBean” scope =”page” class=”pkg.MyBean” />

正确答案:C

第2题:

A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()

  • A、 id
  • B、 type
  • C、 name
  • D、 class
  • E、 scope
  • F、 create

正确答案:A,D

第3题:

InaJSP-centricshoppingcartapplication,youneedtomoveaclient’shomeaddressoftheCustomerobjectintotheshippingaddressoftheOrderobject.TheaddressdataisstoredinavalueobjectclasscalledAddresswithpropertiesfor:streetaddress,city,province,country,andpostalcode.WhichtwoJSPcodesnippetscanbeusedtoaccomplishthisgoal?()

A.<c:setvar=’order’property=’shipAddress’value=’${client.homeAddress}’/>

B.<c:settarget=’${order}’property=’shipAddress’value=’${client.homeAddress}’/>

C.<jsp:setPropertyname=’${order}’property=’shipAddress’value=’${client.homeAddress}’/>

D.<c:setvar=’order’property=’shipAddress’><jsp:getPropertyname=’client’property=’homeAddress’/></c:store>

E.<c:settarget=’${order}’property=’shipAddress’><jsp:getPropertyname=’client’property=’homeAddress’/></c:set>


参考答案:B, E

第4题:

A JSP page needs to perform some operations before servicing the first request. Where can this be done?()

  • A、 within a method called jspInit
  • B、 within the page directive of the JSP page
  • C、 within a scriptlet at the top of the JSP page
  • D、 within the  XML element

正确答案:A

第5题:

You create a Web site that stores users' active themes in user profile objects. You need to apply users' preferred themes when they log on to the Web site. What should you do? ()

  • A、In the InitComplete event handler, set the Theme property of the Page object based on the user profile.
  • B、In the PreLoad event handler, set the Theme property of the Page object based on the user profile.
  • C、In the OnLoad event handler, set the Theme property of the Page object based on the user profile.
  • D、In the PreInit event handler, set the Theme property of the Page object based on the user profile.

正确答案:D

第6题:

JSP中JavaBean是通过指令标签()来访问的。

  • A、〈%@ page%〉
  • B、〈jsp:useBean〉
  • C、〈jsp:setProperty〉
  • D、〈jsp:getProperty〉

正确答案:B

第7题:

Given the element from the web application deployment descriptor: /main/page1.jsp true and given that /main/page1.jsp contains: <% int i = 12; %> <%= i %>  What is the result?()

  • A、<b></b>
  • B、<b>12</b>
  • C、The JSP fails to execute.
  • D、<% int i = 12 %><b><%= i %></b>

正确答案:C

第8题:

Giventheelementfromthewebapplicationdeploymentdescriptor:<jsp-property-group><url-pattern>/main/page1.jsp</url-pattern><scripting-invalid>true</scripting-invalid></jsp-property-group>andgiventhat/main/page1.jspcontains:<%inti=12;%><b><%=i%></b>Whatistheresult?()

A.<b></b>

B.<b>12</b>

C.TheJSPfailstoexecute.

D.<%inti=12%><b><%=i%></b>


参考答案:C

第9题:

You create a Web Form that contains a button named btnCancel that enables users to exit the page. When users click this button, validation must not occur. During testing you learn that clicking the Cancel button does not enable users to exit the page. You need to ensure that users can always exit the page. What should you do? ()

  • A、Set the Enabled property of the validation controls on the Web Form to False.
  • B、Set the CausesValidation property of the btnCancel button to False.
  • C、Set the CausesValidation property of the btnCancel button to True.
  • D、Set the Visible property of the validation controls on the Web Form to False.

正确答案:B

第10题:

You need to create a JavaBean object that is used only within the current JSP page. It must NOT beaccessible to any other page including those that this page might import. Which JSP standard action canaccomplish this goal?()

  • A、<jsp:useBean id=’pageBean’ type=’com.example.MyBean’ />
  • B、<jsp:useBean id=’pageBean’ class=’com.example.MyBean’ />
  • C、<jsp:makeBean id=’pageBean’ type=’com.example.MyBean’ />
  • D、<jsp:makeBean id=’pageBean’ class=’com.example.MyBean’ />

正确答案:B

更多相关问题