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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| **/Le cde de servlet rechercher:/**
String sx = null;
int nbrc = 0;
String stage = request.getParameter("stage");
String n = request.getParameter("nom");
String sc = request.getParameter("secteur");
if(stage.equals("S0"))
{
stage="*";
nbrc=1;
}
if(n.equals(""))
{
n="*";
nbrc=2;
}
if(sc.equals(""))
{
sc="*";
nbrc=3;
}
List<Prospect> Pros = chercher.FindProspect(sc, n, sc, nbrc);
for(int i=0;i<=Pros.size();i++)
{
Prospect biga = Pros.get(i);
sx+=( "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\">"+
"<input type=\"button\" name=\"bouton\" id=\"bouton\" value=\"Id:" +biga.getId()+"Nom: "+biga.getNom()+"Secteur "+biga.getSector()+"\""+" />"
+"</form></br>");
}
if(sx==null)
{
sx="Aucun Prospect Trouvé";
}
out.println("<html>");
out.println("<head>");
out.println("<title>Resultat</title>");
out.println("</head>");
out.println("<body>");
out.println(sx);
out.println("</body>");
out.println("</html>");
} finally
{
out.close();
}
} |
Partager