package fr.cph.stock.web.servlet;

import java.io.IOException;

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.log4j.Logger;

@WebServlet(name = "IndexServlet", urlPatterns = { "/index" })
public class IndexServlet extends HttpServlet {

	/** **/
	private static final long serialVersionUID = 1L;

	@Override
	protected final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
		if (request.getServerName().equals("stocktracker.fr")) {
			response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
			response.setHeader("Location", "https://www.stocktracker.fr");
		} else {
			request.getRequestDispatcher("index.jsp").forward(request, response);
		}
	}
}

@@ -277,41 +277,8 @@
 e;%0A%0A
-import org.apache.log4j.Logger;%0A%0A
 @Web
@@ -875,9 +875,8 @@
 %09%09%7D%0A%09%7D%0A%7D
-%0A

Clean code