blob: 6a728bfe0807a652af4216a7c30161759860bf7f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008 Innoopract Informationssysteme GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
******************************************************************************/
package org.eclipse.epp.wizard.internal;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** Servlet used for tracking downloads and clicks to external service providers
* @author mwoelker
*
*/
public class RedirectServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
protected void doPost( HttpServletRequest req, HttpServletResponse resp )
throws ServletException, IOException
{
String userAgent = req.getHeader( "user-agent" );
String destination = req.getParameter( "destination" );
String roots = req.getParameter( "roots" );
String ipAdress = req.getRemoteAddr();
StatsLogger.Statistic stat = new StatsLogger.Statistic(destination, userAgent, ipAdress, roots);
Activator.getDefault().getStatsLogger().log( stat );
}
}