SCDCD(310-081)

单选题Given an Http Session session. A Servlet Request request. And a Servlet Context context. Which retrieves a URL to /WEB INF/ my config.xml within a web application?()Asession.get Resource (“/WEB-INF/myconfig.xml”)Brequest.get Resource (“/WEB-INF/myconfi

题目
单选题
Given an Http Session session. A Servlet Request request. And a Servlet Context context. Which retrieves a URL to /WEB INF/ my config.xml within a web application?()
A

 session.get Resource (“/WEB-INF/myconfig.xml”)

B

 request.get Resource (“/WEB-INF/myconfig.xml”)

C

 context.get Resource (“/WEB-INF/myconfig.xml”)

D

 get Class ().get Resource (“/WEB-INF/myconfig.xml”)

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

第1题:

一个servlet的类文件必须发布在虚拟目录里的什么文件夹下?()。

  • A、ROOT
  • B、WEB-INF/lib
  • C、WEB-INF/classes
  • D、WEB-INF/

正确答案:C

第2题:

Which two actions protect a resource file from direct HTTP access within a web application?()

  • A、Placing it in the /secure directory
  • B、Placing it in the /WEB-INF directory
  • C、Placing it in the /META-INF/secure directory
  • D、Creating a  element within the deployment descriptor

正确答案:B,C

第3题:

GivenanHttpSessionsession.AServletRequestrequest.AndaServletContextcontext.WhichretrievesaURLto/WEBINF/myconfig.xmlwithinawebapplication?()

A.session.getResource(“/WEB-INF/myconfig.xml”)

B.request.getResource(“/WEB-INF/myconfig.xml”)

C.context.getResource(“/WEB-INF/myconfig.xml”)

D.getClass().getResource(“/WEB-INF/myconfig.xml”)


参考答案:C

第4题:

Which path is required to be present within a WAR file?()

  • A、/classes
  • B、/index.html
  • C、/MANIFEST-INF
  • D、/WEB-INF/web.xml
  • E、/WEB-INF/classes

正确答案:D

第5题:

在web.xml文件中,描述了一个Servlet,其中()指定了Servlet类的访问路径。

  • A、 <servlet>中的<servlet-name> 
  • B、<url-pattrrn> 
  • C、 WEB-INF文件夹<servlet-class>   
  • D、 <servlet-mapping>中的<servlet-name>

正确答案:B

第6题:

Given an Http Session session. A Servlet Request request. And a Servlet Context context. Which retrieves a URL to /WEB INF/ my config.xml within a web application?()

  • A、 session.get Resource (“/WEB-INF/myconfig.xml”)
  • B、 request.get Resource (“/WEB-INF/myconfig.xml”)
  • C、 context.get Resource (“/WEB-INF/myconfig.xml”)
  • D、 get Class ().get Resource (“/WEB-INF/myconfig.xml”)

正确答案:C

第7题:

Which three are described in the standard web application deployment descriptor?()

  • A、session configuration
  • B、MIME type mappings
  • C、context root for the application
  • D、servlet instance pool configuration
  • E、web container default port bindings
  • F、Servlet Context initialization parameters

正确答案:A,B,F

第8题:

GivenanHttpSessionsession,aServletRequestrequest,andaServletContextcontext,whichretrievesaURLto/WEB-INF/myconfig.xmlwithinawebapplication?()

A.session.getResource("/WEB-INF/myconfig.xml")

B.request.getResource("/WEB-INF/myconfig.xml")

C.context.getResource("/WEB-INF/myconfig.xml")

D.getClass().getResource("/WEB-INF/myconfig.xml")


参考答案:C

第9题:

现在我们为MyWebApp开发了一些Servlet,应该将这些Servlet发布于()文件夹中。

  • A、/(根目录)
  • B、/WEB-INF/
  • C、/WEB-INF/classes
  • D、/WEB-INF/lib

正确答案:C

第10题:

Which path, relative to a web application’s root, identifies the web application’s deployment descriptor?()

  • A、 /conf/web.xml
  • B、 /WEB-INF/web.xml
  • C、 /conf/server.xml
  • D、 /META-INF/web.xml
  • E、 /WEB-INF/rules.xml
  • F、 /META-INF/server. Xml

正确答案:B

更多相关问题