Subversion Repositories bacoAlunos

Rev

Rev 2009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2009 es 1
package pt.estgp.es.exemplos.hibernate.web;
2
 
3
import pt.estgp.es.exemplos.hibernate.HibernateUtils;
2049 es 4
import pt.estgp.es.exemplos.hibernate.Pagina;
2009 es 5
import pt.estgp.es.exemplos.hibernate.Seccao;
6
import pt.estgp.es.exemplos.hibernate.services.ServicoPaginas;
7
 
8
import java.io.IOException;
9
 
10
public class PaginasDeleteServlet extends javax.servlet.http.HttpServlet
11
{
12
 
13
 
14
    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 {
15
 
16
 
17
        1.5.0/docs/api/java/lang/String.html">String idSeccao = request.getParameter("idSeccao");
18
 
19
 
2049 es 20
        long idPagina = new ServicoPaginas().deleteSeccaoService(idSeccao);
21
 
2009 es 22
        request.setAttribute("id",idPagina);
23
        request.getRequestDispatcher("apresentaPagina.jsp").forward(request,response);
24
    }
25
 
26
    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 {
27
        doPost(request,response);
28
    }
29
 
30
}