Yes, you would put the declarations inside the declaration delimiters <%! %>.
Now, as to whether it's a good idea or not is another story. I'd advise against it. The general consensus is that the less Java on a JSP, the better; none being ideal. [ December 02, 2004: Message edited by: Bear Bibeault ]