多选题 For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
id
name
type
param
property
reqParam
attribute
单选题 What is the result?()
The program runs and prints “0”
The program runs and prints “1”
The program runs but aborts with an exception.
An error “possible undefined variable” at line 4 causes compilation to fail.
An error “possible undefined variable” at line 9 cause compilation to fail.
多选题 Which three are described in the standard web application deployment descriptor?()
session configuration
MIME type mappings
context root for the application
servlet instance pool configuration
web container default port bindings
ServletContext initialization parameters
单选题 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?()
getCreationTime
invalidateAfter
getLastAccessedTime
getMaxInactiveInterval
单选题 Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()
abstract public void methoda ();
public abstract double inethoda ();
static void methoda (double dl) {}
public native double methoda () {}
protected void methoda (double dl) {}
多选题 A Company.com developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in a thread-safe manner. Which two can support this design goal?()
Store the data in a local variable.
Store the data in an instance variable.
Store the data in the HttpSession object.
Store the data in the ServletContext object.
Store the data in the ServletRequest object.
多选题 A Company.com developer has created a web application that includes a servlet for each use case in the application. These servlets have become rather difficult to maintain because the request processing methods have become very large. There is also common processing code in many servlets because these use cases are very similar. Which two design patterns can be used together to refactor and simplify this web application? ()
Proxy
View Helper
Front Controller
Session Façade
Business Delegate
Model-View-Controller
多选题 Which two successfully translate and result in a value of true?()
${true or false}
${requestScope[foo][0] > 500}
${requestScope[“foo”][1] = 420}
${(requestScope[“foo”][0] lt 50) && (3 gt 2)
单选题 What is the result?()
the program runs and prints nothing.
The program runs and prints “Finally”.
The code compiles. But an exception is thrown at runtime.
the code will not compile because the catch block is missing.
多选题 For a given Servlet Response response, which retrieves an object for writing binary data? ()
response.get writer ()
response.get Output Stream ()
response.getOutput Writer()
response.get Writer ().get Output Stream ()
response.get Writer (Writer.OUTPUT_BINARY)