<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");%>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
String n=request.getParameter("button");
if(n.equals("SHOW TABLE"))
{
try{
Connection con = DriverManager.getConnection("jdbc:odbc:t");
String id = request.getParameter("id");
String sql = "Select * from [table1] where id = '" + id + "'";;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery( sql );
}catch(Exception e) {}
}
%>
<TABLE BORDER="1">
<TR>
<TH>ID</TH>
<TH>Name</TH>
</TR>
<TR>
<TD> <%= rs.getString(1) %> </TD>
<TD> <%= rs.getString(2) %> </TD>
</TR>
</TABLE>
<BR>
<%
}
%>
</body>
</html>