Remarks
The essential code creates a servlet session, connects to the database, and stores the Connection object in the servlet session.
This done, the browser is redirected to the SQLCommand servlet.
encodeRedirectURL() is similar to encodeURL(), but specifically intended for use with a sendRedirect() .
We assume that the driver is loaded by a suitable init() method, e.g.:
public void init() {
Class.forName(“oracle.jdbc.driver.OracleDriver”) ;
}
and the URL for the database is predefined in a static variable url.