Are You Recruiter/Hiring Manager

*Filter candidates using TestYourCandidate.com and save 80% time ( saving time for recruiters and interviewers)
*More than 50% candidates can be filtered on Candidate Screening online tests
*Inbuilt exams are available in library, created and tested by experts Try Today...

!!! JSP interview questions !!!

What is a Expression,Declaration,Scriptlet in jsp?

<b>expression </b>
An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. Like
<%= emp.getName()%>
<%= (new java.util.Date()).toLocaleString() %>
You cannot use a semicolon to end an expression.

All the expression code is converting to servlet. All the expressions go to inside service() method of the convert servlet.

<b>Declaration</b>
A declaration declares one or more variables or methods for use later in the JSP source file.
A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as they are separated by semicolons. The declaration must be valid in the scripting language used in the JSP file.