Umm Leinad, let's put it this way: A browser doesn't know what is a JSP (or ASP/PHP/Ruby whatever), it can show only HTML.
A JSP page has HTML content interspersed with scriptlets/expressions/JSTLs which are executed on Tomcat to create HTML content, which is sent to browser. So in the end, our humble browser gets to see just the HTML stuff which it dutifully renders!
So, whatever javascript you want to put in your page, put it in your JSP. It will be untouched by server and sent to browser.
Hope this helps.
Abhishek