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
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD><TITLE> Teste servlet </TITLE><HEAD>");
out.println("<BODY>");
out.println("Veuillez remplire les champs." + "<BR>");
out.println("<FORM NAME=INFO METHODE=POST ACTION='http://localhost:8080/firstServlet/InfoClient'>");
out.println("Nom : ");
out.println("<INPUT type=\"text\" name=\"firstname\" size=\"50\" maxLenght=\"50\"/><BR>");
out.println("Prénom : ");
out.println("<INPUT type=\"text\" name=\"lastname\" size=\"50\" maxLenght=\"50\"/><BR>");
out.println("<INPUT TYPE=SUBMIT VALUE=\"ENVOI\">");
out.println("</FORM>");
out.println("</BODY>");
out.println("</HTML>");
out.close();
} |