Given:Stringvalue=getServletContext().getInitParameter("foo");inanHttpServletandawebapplicationdeploymentdescriptorthatcontains:<context-param><param-name>foo</param-name><param-value>frodo</param-value></context-param>Whichtwoaretrue?()A.Thefooinitializa

题目

Given:Stringvalue=getServletContext().getInitParameter("foo");inanHttpServletandawebapplicationdeploymentdescriptorthatcontains:<context-param><param-name>foo</param-name><param-value>frodo</param-value></context-param>Whichtwoaretrue?()

A.ThefooinitializationparameterCANNOTbesetprogrammatically.

B.CompilationfailsbecausegetInitParameterreturnstypeObject.

C.ThefooinitializationparameterisNOTaservletinitializationparameter.

D.CompilationfailsbecauseServletContextdoesNOThaveagetInitParametermethod.

E.Thefooparametermustbedefinedwithintheelementofthedeploymentdescriptor.


相似考题
更多“Given:Stringvalue=getServletContext().getInitParameter(&quot;foo&quot;);inanHttpServletand ”相关问题
  • 第1题:

    在PowerPoint 2003启动幻灯片放映的操作中,错误的是()。

    A.单击演示文稿窗口左下角的quot幻灯片放映quot视图按钮

    B.选择quot幻灯片放映quot菜单中的quot观看放映quot命令

    C.选择quot幻灯片放映quot菜单中的quot幻灯片放映quot命令

    D.按F5键


    参考答案C

  • 第2题:

    A service implements the following contract. (Line numbers are included for reference only)01 [ServiceContract(SessionMode = SessionMode.Required)]02 public interface IContosoService03 {04 [OperationContract(IsOneWay = true, IsInitiating = true)]05 void OperationOne(string value);0607 [OperationContract(IsOneWay = true, IsInitiating = false)]08 void OperationTwo(string value);09 }The service is implemented as follows:10 class ContosoService: IContosoService11 {12 public void OperationOne(string value) {...}13 ...14 public void OperationTwo(string value) {...}15 }ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages.You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session.What should you do?()

    A.

    B.

    C.

    D.


    参考答案:B

  • 第3题:

    下面选项中,能够返回Filter设置的所有初始化参数名称的方法是()

    A.getServletContext()

    B.getFilterName()

    C.getInitParameter(String name)

    D.getInitParameterNames()


    D

  • 第4题:

    在PowerPoint中,若想给“文本框”对象或“文本框占位符”设置动画效果,下列说法正确是()。

    A.执行quot格式quot菜单的quot幻灯片设计quot命令,右侧有一个相应的设置窗格

    B.执行quot幻灯片反映quot菜单的quot自定义动画quot命令,右侧有一个相应的设置窗格

    C.执行quot格式quot菜单的quot幻灯片版式quot命令,右侧有一个相应的设置窗格

    D.以上说法全错


    参考答案B

  • 第5题:

    下面选项中, 可用于获取Web应用的初始化参数的所有参数名的方法是()。

    A.getInitParameterNames()

    B.getInitParameter(String name)

    C.getInitParameter()

    D.getParameter(String name)


    A