Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2005 | es | 1 | package pt.estgp.es.exemplos.hibernate.web; |
2 | |||
3 | import pt.estgp.es.exemplos.hibernate.services.ServicoPaginas; |
||
4 | |||
5 | import java.io.IOException; |
||
6 | |||
7 | public class PaginasServlet extends javax.servlet.http.HttpServlet |
||
8 | { |
||
9 | |||
10 | |||
11 | protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, 1.5.0/docs/api/java/io/IOException.html">IOException { |
||
12 | |||
13 | 1.5.0/docs/api/java/lang/String.html">String titulo = request.getParameter("titulo"); |
||
14 | 1.5.0/docs/api/java/lang/String.html">String idPagina = request.getParameter("idPagina"); |
||
15 | |||
16 | |||
17 | new ServicoPaginas().criaSeccaoService(idPagina,titulo); |
||
18 | |||
19 | |||
20 | //SO TEM ISTO |
||
21 | //new ServicoPaginas().criaSeccaoService(idPagina,titulo); |
||
22 | |||
23 | |||
24 | request.setAttribute("id",new 1.5.0/docs/api/java/lang/Long.html">Long(idPagina)); |
||
25 | |||
26 | request.getRequestDispatcher("apresentaPagina.jsp").forward(request,response); |
||
27 | } |
||
28 | |||
29 | protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, 1.5.0/docs/api/java/io/IOException.html">IOException { |
||
30 | doPost(request,response); |
||
31 | } |
||
32 | |||
33 | } |