This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Actually in defineTag value attribute is of String type (not an object).due to that while setting that value in scope (In your case it is a page scope) it is set as a String object with value as "1".
but while defining bean: define tag, in servlet created by server for that jsp there is code like below
due to above code, you are getting ClassCastException.(as value in page scope is of String type)
you can do one thing if you want to resolve this issue, try below code,
but as in 2011 that is no good practice to use scriptlet in your JSP page, you can create Integer in any scope using JSTL, as I am not much aware of JSTL I have done this using a scriptlet.
subject: How to define an Integer using <bean:define>