but it gives
The page var is now: null
why it gives null?
Joined: Mar 22, 2005
Context init parameters are not the same thing as context attributes. In particular, context init parameters are immutable, so you can't use them for what you want to do (except for fetching an initial value with which to seed the attribute).
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