Java Server Pages were something of a late comer to Java and had a rocky start, but that was a couple of years ago. Today, JSP is a well-accepted component of Java, and many tools use and support it. As a framework for scripting database connections, JSP usually works through JDBC (the Java equivalent of ODBC).
JSP is a good vehicle for moving between platforms; you don’t need to be overly cautious about the effects of extensions (like extensions for Unix in PHP) or incompatibilities (like with Microsoft COM objects in ASP). A good place to start with JSP is the reference implementation, Tomcat (http://jakarta.apache.org/tomcat), an open source program.