package main.java.container.hd; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; //import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * Servlet implementation class IndexServlet */ public class IndexServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public IndexServlet() { super(); // TODO Auto-generated constructor stub } private Logger logger = LogManager.getLogger(this.getClass()); private RequestDispatcher jsp; public void init(ServletConfig config) throws ServletException { ServletContext context = config.getServletContext(); jsp = context.getRequestDispatcher("/index.jsp"); } protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { logger.debug("doGet()"); jsp.forward(req, resp); } }