What does "without processing the entire JSP" mean? If parts of the JSP code shouldn't be executed you can wrap them inside an if statement with an appropriate condition. Generating output based on Db values can be done anywhere in a JSP page, so that's not a constraint.
Note that it's considered bad design to keep DB code in a JSP; at the very least, move it into a backing bean.
Ping & DNS - updated with new look and Ping home screen widget