SQL Oracle Java JSP JDBC MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

JSP Declaration Tag


To declare variable or method in JSP declaration tag is used.

Syntax

<%! Scripting-language-declaration %>

Example

In this example we are declaring the field and printing the value of the declared field using the jsp expression tag.

Example

<!DOCTYPE html>
<html>
<head>
<title>Declaration tag</title>
</head>
<body>

<%! int a=100; %>
<%= "Value of the variable is:"+a %>

</body>
</html>