The ultimate solution is to bring your
JSP pages up to modern standards by removing all
Java code from the pages. Java code in pages (scriptlets) have been discredited for over 8 years now -- time to catch up.
Your web application should be structured such that all Java code executes in
servlets and beans, and JSPs utilize JSTL and EL in place of antiquated scriptlets.