Assume the custom tag my:errorProne always throws a java.lan

题目
单选题
Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page mechanism, and outputs the message "File notfound" in the response?()
A

<c:try catch=ex><my:errorProne /></c:try>${ex.message}

B

<c:catch var=ex><my:errorProne /></c:catch>${ex.message}

C

<c:try>. <my:errorProne />. </c:try>. <c:catch var=ex />. ${ex.message}

D

<c:try>. <my:errorProne />. <c:catch var=ex />. ${ex.message}. </c:try>

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

第1题:

Assumethecustomtagmy:errorPronealwaysthrowsajava.lang.RuntimeExceptionwiththemessage"Filenotfound."AnerrorpagehasbeenconfiguredforthisJSPpage.Whichoptionpreventstheexceptionthrownbymy:errorPronefrominvokingtheerrorpagemechanism,andoutputsthemessage"Filenotfound"intheresponse?()

A.<c:trycatch="ex"><my:errorProne/></c:try>${ex.message}

B.<c:catchvar="ex"><my:errorProne/></c:catch>${ex.message}

C.<c:try>.<my:errorProne/>.</c:try>.<c:catchvar="ex"/>.${ex.message}

D.<c:try>.<my:errorProne/>.<c:catchvar="ex"/>.${ex.message}.</c:try>


参考答案:B

第2题:

My father always_________ (smoke)a lot last year.


正确答案:
2.smoked【解析】last year是表示过去的时间状语,故用一般过去时。

第3题:

I can't understand why my boss is always _____fault with my work.

A.finding

B.seeking

C.looking

D.making


参考答案:A

第4题:

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? ()

  • A、 A  element in the echo tag LTD must have the value JSP
  • B、 The echo tag handler must define the setAttribute (String key, String value) method
  • C、 The true element must appear in the echo tag TLD
  • D、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.IterationTag interface
  • E、 The class implementing the echo tag handler must implement the javax.sevlet.jsp.tagext.DynamicAttributes interface

正确答案:C,E

第5题:

在以下XML标记中,符合XML标记命名规则的是______。
A.<xmltag>
B.<my_tag>
C.<2tag>
D.<d tag>


答案:B
解析:
本题考查XML标记的基础知识。在XML中几乎没有预定义的标记,用户可以根据自己的需要自行定义。XML中标记的使用非常自由,用户可以用任何词语作为元素的名称,但在使用时必须遵守如下规则:XML标记必须以“<”开始,以“>”结束;XML标记名必须以字母或下划线开头,可以包含字母、数字、下划线、连字符和圆点;XML标记不能以字母xml(或XML或Xml…)开头;XML标记中不能包含空格。所以本题中只有<my_tag>符合XML标记要求。

第6题:

My mother is always as busy as a ________.

A.fly(苍蝇)

B.cat

C.dog

D.bee


正确答案:D
解析:本句参考译文:我妈妈总是像蜜蜂一样忙来忙去。【知识点来源:Unit 3】 本题考查英语动物词的联想意义。在“as busy as a bee”这个比喻中,被用做比喻的动物形象在英、汉两种语言中是一样的。

第7题:

Safety is always my primary concern.

A:secondary
B:least
C:last
D:chief

答案:D
解析:
安全总是我首要关心的事。primary“首要的”。secondary“次要的”,例如:a question of secondary importance次要的问题。least“最小的”,例如:The least noise could startle the timid dog.很小的声音也会吓住这只胆小的狗。last“最后的”,例如:Save the best for the last.把最好的留在最后。chief“主要的”,最符合题意,例如:a chief source of information信息主要来源。

第8题:

Though I am always free on Sundays. I seldom watch television. _________.

A. So does my sister

B. My sister doesn't

C. My sister is too

D. Nor does my sister


正确答案:D
本题考查So/Nor+助动词+主语.意为“某人也(不)……”当前一句中有表示否定意义的词如seldom,hardly,scarcely等时,用nor。题干的意思是:“尽管我星期天经常没事,我也很少看电视。我姐姐也是这样。”

第9题:

My parents always buy__my birthday.

A.anything nice to
B.anything nice for
C.something nice to
D.something nice for

答案:D
解析:
肯定句用something,for表示“为了”。

第10题:

Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()

  • A、 pageContext.getAttribute(“foo”);
  • B、 getPageContext().getAttribute(“foo”);
  • C、 pageContext.getApplicationScope(“foo”);
  • D、 pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);
  • E、 getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

正确答案:D

更多相关问题