/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 
 */
package org.ocelotds.web;

import org.ocelotds.Constants;
import javax.inject.Inject;
import javax.servlet.ServletContext;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import org.ocelotds.annotations.OcelotLogger;
import org.slf4j.Logger;

/**
 * Servlet to serve ocelot.js
 *
 * @author hhfrancois
 */
@WebServlet(urlPatterns = {Constants.SLASH_OCELOT, Constants.SLASH_OCELOT_JS})
public class JSServlet extends AbstractFileServlet {

	private static final long serialVersionUID = 1973549844535787671L;

	@Inject
	@OcelotLogger
	private transient Logger logger;

	@Override
	protected String getFilename(HttpServletRequest request) {
		String minify = request.getParameter(Constants.MINIFY_PARAMETER);
		final ServletContext servletContext = request.getServletContext();
		String filename = servletContext.getInitParameter(Constants.OCELOT_MIN);
		if (Constants.FALSE.equalsIgnoreCase(minify)) {
			filename = servletContext.getInitParameter(Constants.OCELOT);
		}
		return filename;
	}

	@Override
	protected String getMimetype(HttpServletRequest request) {
		return Constants.JSTYPE;
	}
}

@@ -269,37 +269,8 @@
 s;%0D%0A
-import javax.inject.Inject;%0D%0A
 impo
@@ -299,24 +299,24 @@
 etContext;%0D%0A
+
 import javax
@@ -398,81 +398,8 @@
 st;%0D
-%0Aimport org.ocelotds.annotations.OcelotLogger;%0D%0Aimport org.slf4j.Logger;%0D
 %0A%0D%0A/
@@ -601,16 +601,16 @@
 et %7B%0D%0A%0D%0A
+
 %09private
@@ -676,71 +676,8 @@
 %0D%0A%0D%0A
-%09@Inject%0D%0A%09@OcelotLogger%0D%0A%09private transient Logger logger;%0D%0A%0D%0A
 %09@Ov

remove useless logger