Firstly, Java code in a JSP is a huge no-no! Please read
this JspFaq entry.
Secondly, you cannot cast a String to an int. That's just basic Java.
As this isn't really about JSP at all, it's been moved to the Beginning Java forum.
[Edit: Paul beat me by 20 seconds!]