Also, if you are new to JSP, you're heading down the wrong path, and doing it rapidly.
Java scriptlets (those constructs surrounded by <% and %>) have been discredited for 10 years now since the introduction of JSP 2. You are writing JSPs as if it were 2001, not 2012.
You should start off on the right foot and
not be developing bad habits now that you'll just need to unlearn later.
There should be
no Java code in a JSP. None. Nada. Zero.
Rather, modern JSP pages should use the JSTL (that's where the aforementioned <c:set> tag comes from) and the EL (Expression Language). I'd suggest you update whatever resource you are using to learn JSP.
I also recommend that newcomers to JSP read the following article:
The Secret Life of JSPsThe Front Man