<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.DriverManager,java.sql.Connection" %> <%! String driver = "org.postgresql.Driver"; String url = "jdbc:postgresql://localhost:5432/"; String user = "postgres"; String password = "12345"; Connection connect; %>

Conexion a la BD tienda

<% try { Class.forName(driver); connect = DriverManager.getConnection(url, user, password); %>

Exito en la conexión:

<% connect.close(); } catch(Exception e) { %>

¡Ups! Ocurrio un error: <%=e%>

<% } %> Regresar