JSP and Servlet Quiz

Description: JSP and Servlet Quiz
Number of Questions: 11
Created by:
Tags: java jsp
Attempted 0/11 Correct 0 Score 0
  1. by using request.getMethod()

  2. by using request.setMethod()

  3. impossible to know

  4. none of these

Correct Option: A

What is legal about JSP scriplets

  1. A loop can begin in one Scriptlet and end in another

  2. Statements in Scriptlets should follow Java Syntax

  3. Semicolon is needed at the end of each statement in a Scriptlet

  4. All the above

Correct Option: D

Which method is called first each time a Servlet is invoked ?

  1. Start()

  2. Run()

  3. Servive()

  4. init()

Correct Option: D
  1. Stateless session beans doesn’t preserve any state across method calls

  2. Stateful session beans can be accesses by multiple users at the same time

Correct Option: A
  1. Java applet.

  2. Java servlet.

  3. Either 1 or 2 above.

  4. Neither 1 nor 2 above.

Correct Option: B

What programming language(s) or scripting language(s) does Java Server Pages (JSP) support?

  1. VBScript only

  2. Jscript only

  3. Java only

  4. All of the above are supported

Correct Option: C
  1. Apache Tomcat

  2. Apache Web server

  3. Sun servlet processor

  4. None of the above is correct.

Correct Option: A
  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of the above is correct.

Correct Option: C

How does Tomcat execute a JSP?

  1. As a CGI script

  2. As an independent process

  3. By one of Tomcat's threads

  4. None of the above is correct.

Correct Option: C
- Hide questions