I am new to jsp. I am writing one "declaration" and one "scriptlet" in a jsp page.
But the variables i created in declaration and in "scriptlet" does not store in any one of the
scope. ie page scope,request scope,application scope.why.
Here is my following jsp file named as "success.jsp",
<%! int x=20; %>//x is not created in any scope.
<% int y=30; %>// y is not created in any scope.
<script>
var p="${x}";//here,variable p does not get any value.
var q="${y}";//here,variable does not get any value.
</script>
why the variables "x" and "y" does not created in any one of the scope.And how to get the values stored in "x" and "y" variables.