A. The developer must ensure that every URL is properly encoded using the appropriate URL rewriting APIs
B. The developer must provide an alternate mechanism for managing sessions and abandon theHttpSession mechanism entirely
C. The developer can ignore this issue. Web containers are required to support automatic URL rewriting when cookies are not supported
D. The developer must ass the string ?id=
您可能感兴趣的试卷
你可能感兴趣的试题
What code, inserted at line 21, is called prior to a session being migrated to a different JVM assuming the web application containing MyExample is deployed in a container which supports distributed applications?()
A. public void valueUnbound(HttpSessionEvent ev){...}
B. public void sessionPassivated(HttpSessionEvent ev){...}
C. public void sessionDidActivate(HttpSessionEvent ev){...}
D. public void sessionWillPassivate(HttpSessionEvent ev){...}
A. A filter must implement the destroy method
B. A filter must implement the doFilter method
C. A servlet may have multiple filters associated with it
D. A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface
E. A filter that is part of a filter chain passes control to the next filter in the chain by invoking the filterChain forward method
F. For each
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? ()
A.A
B.B
C.C
D.D
E.E
Given the HttpServlet code:
getServletContext().setAttribute(“foo”, “value”);
What is the result?()
A. The attribute foo is placed in the application
B. A ServletContextListener registered for that servlet is notified
C. A ServletAttributeListener registered for that servlet is notified
D. An HttpSessionAttributeListener registered for that servlet is notified
A. The init method on a filter is called the first time a servlet mapped to that filter is invoked
B. A filter defined for a servlet must always forward control to the next resource in the filter chain.
C. Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file
D. If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it
A. A web application may override the web container’s implementation classes
B. A web application running in a J2EE product may override classes in the javax.* namespace
C. A web application class loader may NOT override any classes in the java.* and javax.* namespace
D. Resources in the WAR class directory or in any of the JAR files within the library directory may be accessed using the J2SE semantics of getResource
E. Resources in the WAR class directory or in any of the JAR files within the library directory cannot be accessed using the J2SE semantics of getResource
Within the web application deployment descriptor, which defines a valid JNDI environment entry()
A.A
B.B
C.C
D.D
A. /conf/web.xml
B. /WEB-INF/web.xml
C. /conf/server.xml
D. /META-INF/web.xml
E. /WEB-INF/rules.xml
F. /META-INF/server. Xml
Which two are true()
A. Line 13 is not valid for a servlet declaration
B. Line 14 is not valid for a servlet declaration
C. One instance of the servlet will be loaded at startup
D. Ten instance of the servlet will be loaded at start up
E. the servlet will be referenced by the name catalog in mappings
最新试题
What else must the developer do to ensure that the intended security goal is achieved()?
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? ()
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?()
A developer for the Company.com web site has been told that users may turn off cookie support in their browsers. What must the developer do to ensure that these customers can still use the web application?()
Which three are guaranteed to be valid for the element of a web application deployment descriptor?()
What code, inserted at line 21, is called prior to a session being migrated to a different JVM assuming the web application containing MyExample is deployed in a container which supports distributed applications?()
Which three can be placed at line 23 to retrieve an existing HttpSession object?()
Which the JSTL code snippet can be used to import content from another web resource?()
Which the two are valid and equivalent?()
A JSP page, current.jsp, is created to display the current weather report. The weather report is contained in a weather.html page that is rewritten every five minutes. Which line, appearing in current.jsp, ensures that the most recent version of weather.html is included whenever current.jsp is referenced?()