Kathy,
You may want to read the following article (written by our esteemed moderator, Bear Bibeault):
http://www.javaranch.com/journal/200510/Journal200510.jsp#a1 The thing to remember is that the server side Java/Jsp code and the client side Javascript code run in two different worlds. By the time your Javascript and HTML are rendered in the user's browser, the JSP/Java code is done executing.
If, from your browser, you click on View -> HTML Source, you will see what the JSP/Java code produces. This output gets loaded into the browesr's memory and is then interpreted as HTML and/or Javascript.
The article will do a better job of explaining this than I just did.
-Ben
[ May 19, 2006: Message edited by: Ben Souther ]