搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【单选题】

Given&ensp;the&ensp;JSP&ensp;code:<br /> <%&ensp;request.setAttribute("foo",&ensp;"bar");&ensp;%>and&ensp;the&ensp;Classic&ensp;tag&ensp;handler&ensp;code:<br /> 5.&ensp;public&ensp;int&ensp;doStartTag()&ensp;throws&ensp;JspException&ensp;{<br /> 6.&ensp;//&ensp;insert&ensp;code&ensp;here<br /> 7.&ensp;//&ensp;return&ensp;int<br /> 8.&ensp;}<br /> Assume&ensp;there&ensp;are&ensp;no&ensp;other&ensp;"foo"&ensp;attributes&ensp;in&ensp;the&ensp;web&ensp;application.<br /> Which&ensp;invocation&ensp;on&ensp;the&ensp;pageContextobject,inserted&ensp;at&ensp;line&ensp;6,assigns&ensp;"bar"&ensp;to&ensp;the&ensp;variable&ensp;x?()

A、String x = (String) pageContext.getAttribute("foo")

B、String x = (String) pageContext.getRequestScope("foo")

C、It is NOT possible to access the pageContext object from within doStartTag

D、String x = (String) pageContext.getRequest().getAttribute("foo")

E、String x = (String) pageContext.getAttribute("foo", PageContext.ANY_SCOPE)

更多“ Given&ensp;the&ensp;JSP&ensp;code:<br /> <%&ensp;request.setAttribute("foo",&ensp;"bar");&ensp;%>and&ensp;the&ensp;Classic&ensp;tag&ensp;handler&ensp;code:<br /> 5.&ensp;public&ensp;int&ensp;doStartTag()&ensp;throws&ensp;JspException&ensp;{<br /> 6.&ensp;//&ensp;insert&ensp;code&ensp;here<br /> 7.&ensp;//&ensp;return&ensp;int<br /> 8.&ensp;}<br /> Assume&ensp;there&ensp;are&ensp;no&ensp;other&ensp;"foo"&ensp;attributes&ensp;in&ensp;the&ensp;web&ensp;application.<br /> Which&ensp;invocation&ensp;on&ensp;the&ensp;pageContextobject,inserted&ensp;at&ensp;line&ensp;6,assigns&ensp;"bar"&ensp;to&ensp;the&ensp;variable&ensp;x?()”相关的问题
第1题

A、immediately&ensp;after&ensp;receiving&ensp;the&ensp;first&ensp;packet&ensp;on&ensp;the&ensp;shared&ensp;tree&ensp;for&ensp;a&ensp;given&ensp;(S,G)  B、after&ensp;receiving&ensp;over&ensp;1&ensp;kb/s&ensp;traffic&ensp;onthe&ensp;shared&ensp;tree&ensp;for&ensp;a&ensp;given&ensp;(S,G)  C、10&ensp;seconds&ensp;after&ensp;receiving&ensp;the&ensp;first&ensp;packet&ensp;on&ensp;the&ensp;shared&ensp;tree&ensp;for&ensp;a&ensp;given&ensp;(S,G)  D、30&ensp;seconds&ensp;after&ensp;receiving&ensp;the&ensp;first&ensp;packet&ensp;on&ensp;the&ensp;shared&ensp;tree&ensp;for&ensp;a&ensp;given&ensp;(S,G)  E、after&ensp;receiving&ensp;over&ensp;10&ensp;kb/s&ensp;traffic&ensp;onthe&ensp;shared&ensp;tree&ensp;for&ensp;a&ensp;given&ensp;(S,G)  

点击查看答案
第2题

A、Use&ensp;the&ensp;given&ensp;value&ensp;as&ensp;an&ensp;IPv6&ensp;address.  B、Use&ensp;the&ensp;given&ensp;value&ensp;as&ensp;a&ensp;DNS&ensp;suffix&ensp;search&ensp;item.  C、Use&ensp;the&ensp;given&ensp;value&ensp;as&ensp;a&ensp;WEP&ensp;key&ensp;for&ensp;a&ensp;wireless&ensp;network.  D、Use&ensp;the&ensp;given&ensp;value&ensp;as&ensp;a&ensp;manually&ensp;assigned&ensp;MAC&ensp;address.  

点击查看答案
第4题

A、A.true&ensp;true  B、B.false&ensp;true  C、C.true&ensp;false  D、D.false&ensp;false  

点击查看答案
第5题

A、A.Compilation&ensp;fails.  B、B.An&ensp;exception&ensp;is&ensp;thrown&ensp;at&ensp;runtime.  C、C.The&ensp;code&ensp;executes&ensp;and&ensp;prints&ensp;"running".  D、D.The&ensp;code&ensp;executes&ensp;and&ensp;prints&ensp;"runningrunning".  E、E.The&ensp;code&ensp;executes&ensp;and&ensp;prints&ensp;"runningrunningrunning".  

点击查看答案
第8题

A、A.6  B、B.7  C、C.10  D、D.11  E、E.Compilation&ensp;fails  

点击查看答案
第9题

A、A.7  B、B.49  C、C.343  D、D.Compilation&ensp;fails.  E、E.An&ensp;exception&ensp;is&ensp;thrown&ensp;at&ensp;runtime.  

点击查看答案
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服