HttpSession
ServletConfig
ServletContext
HttpServletRequest
HttpServletResponse
第1题:
Which the three are true about servlet filters?()
第2题:
Which is the true choice about the web container request processing model()?
第3题:
A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()
第4题:
Which element of the web application deployment descriptor defines the servlet class associated with aservlet instance?()
第5题:
You want to create a filter for your web application and your filter will implement javax.servlet.Filter. Which two statements are true?()
第6题:
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? ()
第7题:
Store the data in a public instance variable in the servlet.
Add an attribute to the request object before using the request dispatcher.
Add an attribute to the context object before using the request dispatcher.
This CANNOT be done as the tag handler has no means to extract this data.
第8题:
REQUEST_URI
javax.servlet.forward.request_uri
javax.servlet.forward.REQUEST_URI
javax.servlet.request_dispatcher.request_uri
javax.servlet.request_dispatcher.REQUEST_URI
第9题:
Facade
View Helper
Transfer Object
Intercepting Filter
Composite Facade
第10题:
A filter must implement the destroy method
A filter must implement the doFilter method
A servlet may have multiple filters associated with it
A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface
A filter that is part of a filter chain passes control to the next filter in the chain by invoking the filterChain forward method
For each
第11题:
session.get Resource (“/WEB-INF/myconfig.xml”)
request.get Resource (“/WEB-INF/myconfig.xml”)
context.get Resource (“/WEB-INF/myconfig.xml”)
get Class ().get Resource (“/WEB-INF/myconfig.xml”)
第12题:
HttpSession
ServletConfig
ServletContext
HttpServletRequest
HttpServletResponse
第13题:
Which three are described in the standard web application deployment descriptor?()
第14题:
Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()
第15题:
Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp. Which two techniques can you use to accomplish this goal?()
第16题:
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?()
第17题:
Which is true about the web container request processing model?()
第18题:
Your filter class must implement an init method and a destroy method.
Your filter class must also implement javax.servlet.FilterChain.
When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.
The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.
Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.
第19题:
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
第20题:
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.
第21题:
HttpSession
ServletConfig
ServletContext
HttpServletRequest
HttpServletResponse
第22题:
Add attributes to the session object.
Add attributes on the request object.
Add parameters to the request object.
Use the pageContext object to add request attributes.
Add parameters to the JSP’s URL when generating the request dispatcher.
第23题:
A
B
C
D
第24题:
javax.servlet.http.HttpSessionListener
javax.servlet.http.HttpSessionBindingListener
javax.servlet.http.HttpSessionAttributeListener
javax.servlet.http.HttpSessionActivationListener