单选题 Which is the true choice about the web container request processing model()?
The init method on a filter is called the first time a servlet mapped to that filter is invoked
A filter defined for a servlet must always forward control to the next resource in the filter chain.
Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file
If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it
单选题 Which statement, at line 16, retrieves an InputStream for the file /WEBINF/ nyresrc.bin()?
new InputStream(“/WEB-INF/nyressrc.bin”);
ctx.getInputStream(“/WEB-INF/nyresrc.bin”);
ctx.getresourceAsStream(“/WEB-INF/nyresrc.bin”);
new InputStream(“/WEB-INF/nyresrc.bin”);
getClass().getResourceAsStream(“/WEB-INF/nyresrc.bin”);
多选题 Which the three EL expressions, inserted at line 15, are valid and evaluate to "3"? ()
${vals.2 }
${vals ["2"]}
${vals.index }
${vals[index]}
${vals} [index]
${vals.(vals.index)}
${vals[vals[index-1]]}
多选题 Which two classes or interfaces provide a getSession method?()
javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpSessionContext
javax.servlet.http.HttpsServletResponse
javax.servlet.http.HttpSessionBindingEvent
javax.servlet.http.HttpSessionAttributeEvent
单选题 Which HttpSession method stores an object in a session?()
put(String name. Object value)
set(String name. Object value)
setAttribute(String name. Object value)
putAttribute(String name. Object value)
addAttribute(String name. Object value)
单选题 A developer is designing a web application that must support multiple interfaces, including: • an XML web service for B2B • HTML for web-based clients • WML for wireless customers Which design pattern provides a solution for this problem?( )
Session Façade
Business Delegate
Data Access Object
Model-View-Controller
Chain of Responsibility
多选题 Which two are true? ()
Tag files can only be accessed using a tagdir attribute.
The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
The sort.jsp page produces a translation error because a taglib directive must always have a uri attribute.
Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB-INF/tags.
The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is created and added to the web application.
单选题 What is the result?()
The code compiles and “s=” is printed.
The code compiles and “s=null” is printed.
The code does not compile because Strings is not initialized.
The code does not compile because because Strings cannot be referneed.
The code comiles.butt a NullPointerException is thrown when toString is called.
单选题 When is the Float object. Created in line 3, eligible for garbage collection?()
just after line 5
just after line 6
just after line 7
just after line 8 (that is . as the method returns)
单选题 What is the result?()
An error occurs during page translation.
Translation is successful, but nothing is included in the response.
Both “10 x 5 = 50” and “2 * 3 = 6” are included in the JSP response.
The text “10 x 5 = 50” is included in the JSP response, but “2 * 3 = 6” is NOT.
The text “2 * 3 = 6” is included in the JSP response, but “10 x 5 = 50” is NOT.