User talk:Lithathankam

/* Created on:28/09/07 Database Connection :Java+MSACESS

import javax.servlet.http.*; import javax.servlet.*; import java.sql.*; import java.io.*; public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException { PrintWriter out=response.getWriter; String username=(String)request.getAttribute("uname"); String password=(String)request.getAttribute("pwd"); String role=(String)request.getAttribute("role"); try {	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:db"); Statement stmt=con.createStatement; ResultSet rs=stmt.executeQuery("select * from tb_details"); while(rs.next){ out.println(rs.getString(1)); }	}	catch(Exception e)	{ out.println("Exception"+e); }	out.println("Haiii from servlet"); } }