Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="ISO-8859-1">
- <title>Insert title here</title>
- </head>
- <body>
- <%@page import="java.sql.*" %>
- <%@page import="java.io.*" %>
- <%@page import="java.sql.Connection" %>
- <%
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/aurora","root","");
- Statement st=con.createStatement();
- String query="select * from kongu";
- ResultSet rs=st.executeQuery(query);
- %>
- <%
- while(rs.next())
- {
- %>
- <table >
- <tr>
- <th> Name</th>
- <th>Age</th>
- <th>Mobile Number</th>
- <th>Msg</th>
- <th>Lat</th>
- </tr>
- <tr>
- <td><%=rs.getString(1)%></td>
- <td><%=rs.getString(2)%></td>
- <td><%=rs.getString(3)%></td>
- <td><%=rs.getString(4)%></td>
- <td><%=rs.getString(5)%></td>
- </tr>
- </table>
- <%
- }
- %>
- </body>
- </html>
Add Comment
Please, Sign In to add comment