Package com.itstherules.mediacentre

Source Code of com.itstherules.mediacentre.TemplateServlet

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);
  }
 
}
TOP

Related Classes of com.itstherules.mediacentre.TemplateServlet

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.