package com.itstherules.mediacentre;
import java.io.IOException;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.itstherules.mediacentre.controller.IndexController;
import com.itstherules.mediacentre.freemarker.TemplateEngine;
import com.itstherules.mediacentre.model.MapMapConverter;
public class TemplateServlet extends HttpServlet {
private static final long serialVersionUID = -1798923413034124651L;
@SuppressWarnings("unchecked")
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Map<String, Object> parameters = new MapMapConverter().convert(req.getParameterMap());
IndexController indexController = new IndexController();
indexController.init(new TemplateEngine(getServletContext()));
indexController.show(parameters, resp);
}
}