Package es.ua.dccia.web

Source Code of es.ua.dccia.web.Index

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package es.ua.dccia.web;

import es.ua.dccia.dominio.Peticion;
import es.ua.dccia.negocio.PeticionBO;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
*
* @author otto
*/
@WebServlet("/index")
public class Index extends MustacheServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        PeticionBO pbo = new PeticionBO();
        Map m = new HashMap();
        List<Peticion> destacadas = pbo.listarDestacadas(5);
        m.put("destacadas", destacadas);
        render(m, "index", resp);
    }
   
   

}
TOP

Related Classes of es.ua.dccia.web.Index

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.