1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
RequestDispatcher d;
ResultSet resultat= null;
String s= req.getParameter("id");
String w= req.getParameter("pwd");
Connection con = connecter (s,w);
if (con != null){
try{
Statement st = con.createStatement();
resultat= st.executeQuery("selec* from table1");
}catch(SQLException sql)
{
sql.getMessage();
}
d = req.getRequestDispatcher("OK.jsp");
d.forward(req,res);
}
...
...
} |
Partager