buddy
may there is some other problem with your system but the value is increasing for me..i have copy pasted your program in my
tomcat and while refreshing (internet explorer) the value is increasing as it should be.
and the variable declared in (Declaration Tag) <%! %> are same as to those which are declared at class level in case of servlets