单项选择题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.单项选择题Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()

A. abstract public void methoda ();
B. public abstract double inethoda ();
C. static void methoda (double dl) {}
D. public native double methoda () {}
E. protected void methoda (double dl) {}

2.多项选择题Which the three are valid declarations of a float?()

A. float foo = -1;
B. float foo = 1.0;
C. float foo = 42el:
D. float foo = 2.02f:
E. float foo = 3.03d:

3.多项选择题Which the two demonstrate encapsulation of data?()

A. Member data have no access modifiers.
B. Member data can be modified directly.
C. The access modifier for methods is protected.
D. The access modifier to member data is private.
E. Methods provide for access and modification of data.

4.单项选择题


What OrderSErvlet method is invoked as a result of this from submission?()

A. doGET
B. doPUT
C. doPost
D. doTrace
E. doSubmit

5.单项选择题

After execution. What are the values for i and j ()

A. i = 6 and j = 5
B. i = 5 and j = 5
C. i = 6 and j = 4
D. i = 6and j = 6

6.单项选择题


Which statement at Point X on line 1 allows this code to compile and run?()

A. import java.io.*.;
B. include java.io.*;
C. import java.io.PrintWriter;
D. include java.io.PrintWRiter;
E. No statement in needed.

7.单项选择题


What is the final value of i?()

A. 1
B. 2
C. 3
D. 4
E. 5

8.多项选择题


Which two are valid examples of method overriding?()

A. float getVar() {return x:}
B. public float getVar() {return x; }
C. public double getVar() {return x; }
D. protected float getVar() {return x; }
E. public float getVar(float f) {return f;}

9.多项选择题


Which two are true? ()

A. The foo initialization parameter CANNOT be set programmatically.
B. Compilation fails because getlnitParameter returns type Object.
C. The foo initialization parameter is NOT a servlet initialization parameter.
D. Compilation fails because ServletContext does NOT have a getlnitParameter method.
E. The foo parameter must de defined within the  element of the deployment  descriptor.
F. The foo initialization parameter can also be retrievedusing getSErvletConfig().  GetlnitParameter (“foo”).

10.多项选择题Given a header in an HTTP request: X-Retries:4  Which two retrieve the value of the header from a given ServletRequest request? ()

A. request.getHeader (“X-Retries”)
B. request.getIntHeader (“X-Retries”)
C. request.getRequestHeader (“x-Retries”)
D. request.getHeaders (“X-Retries”).get (0)
E. re request.getRequest Headers (“X-Retries”). Get (0)

最新试题

Which two are true?()

题型:多项选择题

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

题型:单项选择题

For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()

题型:多项选择题

Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()

题型:单项选择题

Given the HttpServlet code:  getServletContext().setAttribute(“foo”, “value”);What is the result?()

题型:单项选择题

Which the three interfaces need to be declared in the web application deployment descriptor? ()

题型:多项选择题

The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()  

题型:单项选择题

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

题型:多项选择题

Which statement, at line 16, retrieves an InputStream for the file /WEBINF/ nyresrc.bin()?

题型:单项选择题

Which the three EL expressions, inserted at line 15, are valid and evaluate to "3"? ()

题型:多项选择题