0
Alien head

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

In JSP, how can you know what HTTP method (GET or POST) is used by client request ?

  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

Which of the following statement is true ?

  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

What is sent to the user via HTTP, invoked using the HTTP protocol on the user's computer, and run on the user's computer as an application?

  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of the above is correct.


Correct Option: B

A JSP is transformed into a(n):

  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

What servlet processor was developed by Apache Foundation and Sun?

  1. Apache Tomcat

  2. Apache Web server

  3. Sun servlet processor

  4. None of the above is correct.


Correct Option: A

What is invoked via HTTP on the Web server computer when it responds to requests from a user's Web browser?

  1. A Java application

  2. A Java applet

  3. A Java servlet

  4. None of the above is correct.


Correct Option: C

How many copies of a JSP page can be in memory at a time?

  1. One

  2. Two

  3. Three

  4. Unlimited


Correct Option: A

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
+ View questions