Firstly, you should be submitting to a servlet, not another JSP, with the id as a request param. The servlet can retrieve the info and forward to the JSP with the data in request scope.
Secondly, putting Java code in a JSP is a bad practice that has been obsolete and discredited for over 12 years.
One of the (very many) good reasons for that is a problem you have in your code that you probably don't even realize: it's not thread safe! As soon as more than one person tries to use your app, it will break, and it will break badly.
If you must use Java scriptlets for your class (why scriptlets are being taught 12 years after their obsolescence is beyond me) always avoid using the <%! %> construct. It's nothing but trouble and certainly not needed here.
But if you can eliminate scriptlets entirely, that's even better!