单选题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”)


相似考题
参考答案和解析
正确答案: A
解析: 暂无解析
更多“单选题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/myc”相关问题
  • 第1题:

    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

  • 第2题:

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

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

    正确答案:B

  • 第3题:

    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

  • 第4题:

    Given an HttpSession session,a ServletRequest request,and a ServletContext context,which retrieves aURL to /WEB-INF/myconfig.xml within a web application?()

    • 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

  • 第5题:

    In which two web application directories can dependent classes and libraries be located? ()

    • A、 /WEB-INF/lib as a JAR file
    • B、 /META-INF/lib as a JAR file
    • C、 /classes as compiled class files
    • D、 /WEB-INF/lib as compiled class files
    • E、 /WEB-INF/classes as compiled class files
    • F、 /META-INF/classes as compiled class files

    正确答案:A,E

  • 第6题:

    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
    • F、 /WEB-INF/index.html
    • G、 /META-INF/index.xml

    正确答案:E

  • 第7题:

    单选题
    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


    正确答案: D
    解析: 暂无解析

  • 第8题:

    单选题
    在Web应用程序中web.xml配置了Servlet的信息,如果你的项目为LoginDemo,那么web.xml最可能位于哪个目录下?()
    A

    LoginDemo/

    B

    LoginDemo/src/

    C

    LoginDemo/logindemo/WEB-INF/bin/

    D

    LoginDemo/logindemo/WEB-INF/


    正确答案: D
    解析: 暂无解析

  • 第9题:

    单选题
    A web application is bound to the context named "/webapp" and the client uses the browser and  makes a request to the resource http://server:port/webapp/ctxl/resource.    Where do you place this resource inside the web application structure?()
    A

    in the subdirectory /WEB-INF/ctxl

    B

    in the subdirectory /META-INF/ctxl

    C

    in the subdirectory /ctxl in the root of the archive

    D

    in the subdirectory /ctxl/resource in the root of the archive

    E

    in the root of the archive


    正确答案: C
    解析: 暂无解析

  • 第10题:

    单选题
    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

    F

     /WEB-INF/index.html

    G

     /META-INF/index.xml


    正确答案: A
    解析: 暂无解析

  • 第11题:

    单选题
    Which retrieves the binary input stream on line 13?()
    A

     request.get Writer ():

    B

     request.get Reader ():

    C

     request.get Input Stream():

    D

     request.get Resource As Stream():

    E

     request.get Resource As Stream (Servlet Request. REQUEST):


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    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


    正确答案: E
    解析: 暂无解析

  • 第13题:

    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

  • 第14题:

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

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

    正确答案:C

  • 第15题:

    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

  • 第16题:

    In which three directories, relative to a web application’s root, may a tag library descriptor file reside when deployed directly into a web application?()

    • A、 /WEB-INF
    • B、 /META-INF
    • C、 /WEB-INF/tlds
    • D、 /META-INF/tlds
    • E、 WEB-INF/resources
    • F、 /META-INF/resources

    正确答案:A,C,E

  • 第17题:

    Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application.  In which object can the data that A shares with B be stored?()

    • A、 HttpSession
    • B、 ServletConfig
    • C、 ServletContext
    • D、 HttpServletRequest
    • E、 HttpServletResponse

    正确答案:D

  • 第18题:

    A web application is bound to the context named "/webapp" and the client uses the browser and  makes a request to the resource http://server:port/webapp/ctxl/resource.    Where do you place this resource inside the web application structure?()

    • A、in the subdirectory /WEB-INF/ctxl
    • B、in the subdirectory /META-INF/ctxl
    • C、in the subdirectory /ctxl in the root of the archive
    • D、in the subdirectory /ctxl/resource in the root of the archive
    • E、in the root of the archive

    正确答案:C

  • 第19题:

    单选题
    Given an HttpSession session,a ServletRequest request,and a ServletContext context,which retrieves aURL to /WEB-INF/myconfig.xml within a web application?()
    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
    解析: 暂无解析

  • 第20题:

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

    /(根目录)

    B

    /WEB-INF/

    C

    /WEB-INF/classes

    D

    /WEB-INF/lib


    正确答案: B
    解析: 暂无解析

  • 第21题:

    单选题
    Servlet A receives a request that it forwards to servlet B within another web application in the same webcontainer. Servlet A needs to share data with servlet B and that data must not be visible to other servlets inA’s web application. In which object can the data that A shares with B be stored?()
    A

    HttpSession

    B

    ServletConfig

    C

    ServletContext

    D

    HttpServletRequest

    E

    HttpServletResponse


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application.  In which object can the data that A shares with B be stored?()
    A

     HttpSession

    B

     ServletConfig

    C

     ServletContext

    D

     HttpServletRequest

    E

     HttpServletResponse


    正确答案: E
    解析: 暂无解析

  • 第23题:

    多选题
    In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()
    A

    /WEB-INF

    B

    /META-INF

    C

    /WEB-INF/tlds

    D

    /META-INF/tlds

    E

    /WEB-INF/resources

    F

    /META-INF/resources


    正确答案: A,D
    解析: 暂无解析