Rev 2005 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2005 | es | 1 | package pt.estgp.es.exemplos.hibernate.web; |
2 | |||
2060 | es | 3 | import pt.estgp.es.exemplos.hibernate.HibernateUtils; |
4 | import pt.estgp.es.exemplos.hibernate.Pagina; |
||
5 | import pt.estgp.es.exemplos.hibernate.Seccao; |
||
2005 | es | 6 | import pt.estgp.es.exemplos.hibernate.services.ServicoPaginas; |
7 | |||
8 | import java.io.IOException; |
||
2060 | es | 9 | import java.util.ArrayList; |
2005 | es | 10 | |
11 | public class PaginasServlet extends javax.servlet.http.HttpServlet |
||
12 | { |
||
13 | |||
14 | |||
15 | 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 { |
||
16 | |||
17 | 1.5.0/docs/api/java/lang/String.html">String titulo = request.getParameter("titulo"); |
||
18 | 1.5.0/docs/api/java/lang/String.html">String idPagina = request.getParameter("idPagina"); |
||
19 | |||
20 | |||
2060 | es | 21 | |
2005 | es | 22 | new ServicoPaginas().criaSeccaoService(idPagina,titulo); |
23 | |||
24 | |||
25 | //SO TEM ISTO |
||
26 | //new ServicoPaginas().criaSeccaoService(idPagina,titulo); |
||
27 | |||
28 | |||
29 | request.setAttribute("id",new 1.5.0/docs/api/java/lang/Long.html">Long(idPagina)); |
||
30 | |||
31 | request.getRequestDispatcher("apresentaPagina.jsp").forward(request,response); |
||
32 | } |
||
33 | |||
34 | 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 { |
||
35 | doPost(request,response); |
||
36 | } |
||
37 | |||
38 | } |