Using
Java scriptlets as suggested in these replies is a bad idea. Scriptlets have been discredited for almost 10 years now and their use on JSP pages is irresponsible at this point. It's like designing a modern TV using vacuum tubes!
Use the JSTL and EL in modern JSP pages.
For example, if you want to use the parameter value
xyz on a page:
No Java code should ever be used on a JSP page that was written after 2002!