The SQLConnect servlet
public class SQLConnect extends HttpServlet {
public void doPost(HttpServletRequest req,
HttpServletResponse resp) throws . . . {
String username = req.getParameter(“username”) ;
String password = req.getPassword(“password”) ;
HttpSession session = req.getSession(true) ;
DriverManager.getConnection(url, username, password) ;
session.setAttribute(“connection”, conn) ;
resp.encodeRedirectURL(“/dbc/servlet/SQLCommand”)) ;
} catch (SQLException e) {
. . . make suitable sendError() call . . .