1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String Serial=request.getParameter("serial");
String critere="";
if (Serial != null && !Serial.equals("")){ critere = "serial='" + Serial + "'and "; }
critere = critere + "1=1";
try {
recher e = new recher();
List v = e.chercheravance(critere);
HttpSession session=request.getSession(true);
session.setAttribute("bean4",v);
getServletContext().getRequestDispatcher("/RechercheSR.jsp").forward(request,response);
} catch (ClassNotFoundException cl) {
Logger.getLogger(RechercheS.class.getName()).log(Level.SEVERE, null, cl);
}catch(recher.DonneesIncompletesException d) {
Logger.getLogger(RechercheS.class.getName()).log(Level.SEVERE, null, d);
}catch (SQLException sql) {
Logger.getLogger(RechercheS.class.getName()).log(Level.SEVERE, null, sql);
}catch(NullPointerException n){
Logger.getLogger(RechercheS.class.getName()).log(Level.SEVERE, null, n);
}
} |
Partager