Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PrintWriter writer = response.getWriter();
- writer.println("<!DOCTYPE HTML>");
- writer.println("<html>");
- writer.println("<body>");
- writer.println("<h1>TEST H1</h1>");
- writer.println("<ul>");
- writer.println("<li>TESTE LI</li>");
- writer.println("<p>" + ConexaoBD.getName() + "</p>");
- writer.println("</ul>");
- writer.println("</body>");
- writer.println("</html>");
- Connection con = null;
- Class.forName("org.postgresql.Driver");
- Properties props = new Properties();
- String url = "jdbc:postgresql://localhost/customers";
- props.setProperty("user","postgres");
- props.setProperty("password","pass");
- props.setProperty("ssl","true");
- con = DriverManager.getConnection(url, props);
- Statement st = con.createStatement();
- ResultSet rs = st.executeQuery("select * from table limit 1");
- return rs.getString(2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement