Well, since JSP is server-side, no. If you want to try javascript, then yes, but you have to be using mozilla (or other gecko browser). Be aware that many F-keys have a meaning to the browser (such as F5 for refresh), so you have to keep the browser from seeing the keypress. Here's some code that works for F1-F12, with the notable exception of F7, which Mozilla Firebird won't ignore.

If you want to continue exploring this, I'd suggest you go start another thread in the HTML, Javascript, and CSS forum to get some refinement. You're going to need a way to get the javascript funtion to comunicate with your JSP.