Biblioteca Java - Blame information for rev 19
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
19 | mihai | 1 | package exemple.scd.web; |
2 | |||
3 | import java.io.IOException; | ||
4 | import java.io.PrintWriter; | ||
5 | |||
6 | import javax.servlet.ServletException; | ||
7 | import javax.servlet.annotation.WebServlet; | ||
8 | import javax.servlet.http.HttpServlet; | ||
9 | import javax.servlet.http.HttpServletRequest; | ||
10 | import javax.servlet.http.HttpServletResponse; | ||
11 | |||
12 | /** | ||
13 | * Servlet implementation class AdaugaPersoanaServlet | ||
14 | */ | ||
15 | @WebServlet(name = "adaugaPersoana", urlPatterns = { "/adaugaPersoana" }) | ||
16 | public class AdaugaPersoanaServlet extends HttpServlet { | ||
17 | private static final long serialVersionUID = 1L; | ||
18 | |||
19 | /** | ||
20 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) | ||
21 | */ | ||
22 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | ||
23 | String nume = request.getParameter("nume"); | ||
24 | String prenume = request.getParameter("prenume"); | ||
25 | |||
26 | PrintWriter out = response.getWriter(); | ||
27 | |||
28 | out.println("Hello "+nume+" "+prenume); | ||
29 | out.close(); | ||
30 | |||
31 | } | ||
32 | |||
33 | } |