Java Servlet Interview Questions for Freshers Pdf - 2

Question: 6

What is JSP declaration?

JSP Declaratives are the JSP tags used to declare variables. Declaratives are enclosed in the <% ! %> tag and ends in semi colon.

You declare variables and functions in the declaration tag and can use anywhere in the JSP.

Question: 7

What types of comments are available in the JSP?

There are two types of comments allowed in the JSP. These are hidden and output comments. A hidden comment does not appear in the generated output in the html, while output comments appear in the generated output.

Example of a hidden comment:

<% This is a hidden comment -%>

Example of an output comment:

<!- This is an output comment ->

Question: 8

How does EL search for an attribute?

EL parser searches the attributes in following order:

Page

Request

Session

Application

Question: 9

What is Session Migration?

Session Migration is a mechanism of moving the session from one server to another in case of server failure. Session migration can be implemented by

Persisting the session into database.

Storing the session in memory on multiple servers.

Question: 10

What must be implemented by all Servlets?

The Servlet Inteface must be implemented by all servlets.

Related Questions