Define JSP Declaration.

Report
Question
24 views

Please explain why do you think this question should be reported?

Report Cancel

JSP Declaration are tags used in declaring variables. They are enclosed in <%!%> tag. They are used in declaring functions and variables.

<%@page contentType=”text/html” %>
<html>
<body>
<%!
int a=0;
private int getCount(){
a++;
return a;
}
%>
<p>Values of a are:</p>
<p><%=getCount()%></p>
</body>
</html>

Please follow and like us:

About the Author