单项选择题


Which statement inserted at line II, retrieves the text from the second text field?()

A. second = request.getParameter (“foo”):
B. second = request.getParameter (“foo”, 1):
C. second = request.getParameter (“foo”,2):
D. second = request.getParameter (foo”) [1]:
E. second = request.getParameter Values (“foo”) [1]:


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题


Which retrieves the binary input stream on line 13?()  

A. request.get Writer ():
B. request.get Reader ():
C. request.get Input Stream():
D. request.get Resource As Stream():
E. request.get Resource As Stream (Servlet Request. REQUEST):

2.单项选择题Given an HttpServlet Request request and Http Servlet Response response, which sets a cookie “username” with the value “joe” in a servlet.?()

A. request.add Cookie (“username”. “joe”)
B. request.set Cookie (“username, “joe”)
C. response.add Cookie (username”, “joe”))
D. request.add Header (new Cookie (“username”, “joe”))
E. request.add Cookie (new Cookie (“username”, “joe”))
F. response.add Cookie (new Cookie (“username”, “joe”))
G. response.add Header (new Cookie (“username”, “joe”))

3.单项选择题


Which statement. At line 16, retrieves an Input Stream for the file / WEBINF/myresrc.bin?()

A. ctx.get put Stream (“/WEB-INF/myresrc.bin”):
B. ctx.get Input Stream (“/WEB-INF/myresrc.bin”):
C. ctx.get Resource As Stream (“/WEB-INF/myresrc.bin”):
D. new Input Stream (new Url (“/WEB-INF/myresrc.bin”):
E. Get Class (). Get Resource As Stream (“/WEB-INF/myresrc.bin”):

4.多项选择题


Which two are true about the tag handler referneed by my Tag. ()

A. The do Start Tag method is called once.
B. The do After Body method is NOT called.
C. The EVAL_Page constant is a valid return value for the do End Tag Method.
D. the EVAL_BODY_BUFFERED constant is a valid return value for the do Start Tag method.

5.单项选择题


What is the result?()

A. The output is X = 6 y = 0
B. The output is x = 7 y = 0
C. The output is x = 6 y = -1
D. The output is x = 7 y = -1
E. Compilation will fail.

6.单项选择题


What is the result?()

A. the program runs and prints nothing.
B. The program runs and prints “Finally”.
C. The code compiles. But an exception is thrown at runtime.
D. the code will not compile because the catch block is missing.

7.多项选择题Which four types of object can be thrown using the throw statement?()

A. Error
B. Event
C. Object
D. Exception
E. Throwable
F. Runtime Exception

8.单项选择题


What is the result?()

A. Compilation will succeed.
B. Compilation will fail at line 5.
C. Compilation will fail at line 6.
D. Compilation will fail at line 14.
E. Compilation will fail at line 176.

9.单项选择题


Which statement at Point X on line 1 allows this code to compile and run?()

A.import java.io.PrintWtier;
B.include java.io.PrintWRiter;
C.import java.io.OutputStream Writer;
D.include java.io.OutputStream Writer;
E.No statement is needed.

10.单项选择题


What is the Result?()

A. baz has the value of “”.
B. baz has the value of null.
C. baz has the value of “red”
D. baz has the value of “blue”
E. baz has the value of “green”
F. The code does not compile.
G. the program throws an exception.

最新试题

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? ()

题型:多项选择题

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 the three are true about servlet filters?()

题型:多项选择题

Which two classes or interfaces provide a getSession method?()

题型:多项选择题

For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()

题型:多项选择题

Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()

题型:单项选择题

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? ()

题型:单项选择题

What else must the developer do to ensure that the intended security goal is achieved()?  

题型:单项选择题

Which the three interfaces need to be declared in the web application deployment descriptor? ()

题型:多项选择题

Which two authentication mechanisms provide weaker protection than other mechanisms?()

题型:多项选择题