What is JSP?
Java Server Page (JSP) is a technology for creating dynamically generated web pages through the use of servlets.
----------------------------------------------------------------------------------------------------
Syntax of JSP declarative tag ?
<%!
%>
----------------------------------------------------------------------------------------------------
Syntax of JSP expression tag?
<%= Expression Tag %>
----------------------------------------------------------------------------------------------------
What is the difference b/w variable declared inside a declaration and variable declared in scriplet ?
Variable declared inside a declaration tag treated as instance variable and will be placed at class level in the generated servlet.
<%!
int a =10;
%>
Variable declared inside a scriplet tag will be placed inside _jspService() method of generated servlet.
It act as local variable.
<%
int b = 20;
%>
Java Server Page (JSP) is a technology for creating dynamically generated web pages through the use of servlets.
----------------------------------------------------------------------------------------------------
Syntax of JSP declarative tag ?
<%!
%>
----------------------------------------------------------------------------------------------------
Syntax of JSP expression tag?
<%= Expression Tag %>
----------------------------------------------------------------------------------------------------
What is the difference b/w variable declared inside a declaration and variable declared in scriplet ?
Variable declared inside a declaration tag treated as instance variable and will be placed at class level in the generated servlet.
<%!
int a =10;
%>
Variable declared inside a scriplet tag will be placed inside _jspService() method of generated servlet.
It act as local variable.
<%
int b = 20;
%>