多项选择题A JSP page needs to instantiate a JavaBean to be used by only that page. Which two jsp:useBean attributes must be used to access this attribute in the JSP page?()

A. id
B. type
C. name
D. class
E. scope
F. create


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题For a given ServletResponse response, which retrieves an object for writing binary data?()

A. response.getWriter()
B. response.getOutputStream()
C. response.getOutputWriter()
D. response.getWriter().getOutputSTream()
E. response.getWriter(Writer.OUTPUT_BINARY)

3.单项选择题Given an HttpServletRequest request, which retrieves an object of type Account with an Id of “account”?()

A. Account account = request.get Resource(”account”):
B. Account account = request.get Attribute (“account”):
C. Account account = request.get Parameter (account”):
D. Account account = (Account)request.getResource (“account”):
E. Account account = (Account) request.get Attribute (“account”):
F. Account account = (Account) request.get Paramter (“account”):

4.单项选择题


What is the result?()

A. Compilation succeeds.
B. An error at line 2 cause compilation to fail.
C. An error at line 9 cause compilation to fail.
D. An error at line 10 cause compilation to fail.
E. An error at line 11 cause compilation to fail.

5.单项选择题


What is the result?()

A. The program runs and prints “Hello”
B. An error causes compilation to fail.
C. The program runs and prints “Hello world!”.
D. The program runs but aborts with an exception.

6.单项选择题


What is the result?()

A. foo has the value””
B. foo has the value null.
C. An exception is thrown.
D. The code will not compile.

7.单项选择题Which the statement is true?()

A. The Error class is a Runtime Exception.
B. No exceptions are subclasses of Error.
C. Any statement that may throw an Error must be enclosed in a try block.
D. any statement that may throw an Exception must be enclosed in a try block.
E. Any statement that may throw an Runtime Exception must be enclosed in a try block.

8.单项选择题


Which code snippet inserted at line 12 cause the client to redirect tohttp://www.example.com?()

A. response.send Redirect (http://www.example.com):
B. response.send Redirect (new URL (“http://www.example.com”));
C. Request Dispatcher rd=  get Servlet Context (). Get Request Dispatcher (  http://www.example.com”)’  rd. forward (request. Response):
D. Request Dispatch rd=  Get Servlet Context ().get Request Dispatcher(  New URL (http://www.example.com));  Rd. forward (request.response):

9.单项选择题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”)

10.单项选择题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) {}

最新试题

A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company.  Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet:What is the response output of this JSP page code snippet? ()

题型:单项选择题

Which two authentication mechanisms provide weaker protection than other mechanisms?()

题型:多项选择题

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

题型:单项选择题

When using Form Based Authentication, which pair of fields must be used in the login form?()  

题型:单项选择题

A web application uses the HttpSession mechanism to determine if a user is “logged in”. When a user supplies a valid user name and password, an HttpSession is created for that user. The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?()

题型:单项选择题

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

题型:多项选择题

Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()

题型:多项选择题

Which the JSTL code snippet can be used to import content from another web resource?()

题型:单项选择题

Which three can be placed at line 23 to retrieve an existing HttpSession object?()

题型:多项选择题

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

题型:多项选择题