ADVANCED JAVA PROGRAMMING
Types of Tags in JSP
Smt M.Jeevana Sujitha
Assistant Professor
Department of Computer Science and Engineering
SRKR Engineering College, Bhimavaram, A.P. - 534204
OBJECTIVES
The Objective of this lecture is
Types of Tags in JSP
Types of Tags in JSP
Scriptlet tag: The Scriptlet tag allows us to write the valid java code in the jsp page.
Syntax:
<%
Any valid java code
%>
Example:
<%
out.println(“JSP is better than servlets”);
%>
Types of Tags in JSP
Declarative tag: The Declarative Tag is used to declare variables and methods in the jsp page.
Syntax:
<%!
variable declaration method declaration
%>
Example:
<%!
String msg="Srkr engineering";
%>
Types of Tags in JSP
Expression tag: The Jsp expressions are used to insert java values directly into the output.
syntax:
<%=
Expression code
%>
<%!
String msg=" Srkr engineering ";
%>
<%=msg %>
THANK YOU