1. which two prevent a servlet from handling requests?
A the servlet's init method returns a non-zero status
B the servlet's init method throws a Servlet Exception
C the servlet's init method sets the Servlet Response's context length to 0
D the servlet's init method sets the Servlet Response's context type to null
E the servlet's init method does not return within a time period defined by the servlet container2. which 3 occur during JSP page translation
A JspInit method is called
B Jsp page implementation class is created
C Jsp page implementation class is compiled
D the Jsp page is validated for syntaic correctness3. Given an EL function foo,in namespace func , that requires a long as parameter and returns a Map
A ${func(1)}
B ${foo:func(4)}
C ${func:foo(2)}
D ${foo(5):func}
E ${func:foo("easy")}
F ${func:foo("3").name}4. which can make the data be synchronized
A none of them
B store the data in a vocal var
C store the data in an instance var5. servlet A receives a request that it forwards to Servlet B whithin 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.
A HttpSession
B ServletConfig
C servletContext
D HttpServletRequest
E HttpServletResponse
一共有29题,这5题不太懂,望请高手做答,谢谢
A the servlet's init method returns a non-zero status
B the servlet's init method throws a Servlet Exception
C the servlet's init method sets the Servlet Response's context length to 0
D the servlet's init method sets the Servlet Response's context type to null
E the servlet's init method does not return within a time period defined by the servlet container2. which 3 occur during JSP page translation
A JspInit method is called
B Jsp page implementation class is created
C Jsp page implementation class is compiled
D the Jsp page is validated for syntaic correctness3. Given an EL function foo,in namespace func , that requires a long as parameter and returns a Map
A ${func(1)}
B ${foo:func(4)}
C ${func:foo(2)}
D ${foo(5):func}
E ${func:foo("easy")}
F ${func:foo("3").name}4. which can make the data be synchronized
A none of them
B store the data in a vocal var
C store the data in an instance var5. servlet A receives a request that it forwards to Servlet B whithin 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.
A HttpSession
B ServletConfig
C servletContext
D HttpServletRequest
E HttpServletResponse
一共有29题,这5题不太懂,望请高手做答,谢谢
servlet规范中如下规定:
The servlet container cannot place the servlet into service if the init method :Throws a ServletException
Does not return within a time period defined by the Web server
2. B C D
5. B
5.C
In the case of a web application ed "distributed" in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information (because the information won't be truly global). Use an external resource like a database instead.