Commit 1e6b6f4b authored by Evan W. Patton's avatar Evan W. Patton Committed by Jeffrey I. Schiller

Remove unused OdeRedirectServlet

Change-Id: I1c8be262333f59f888fde0c0111bd43568b673ac
parent 9f43e1b9
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.google.appinventor.server;
import com.google.appinventor.shared.rpc.ServerLayout;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Redirects requests to either the ODE main page or, if requested from
* an Android device, to the executable download page.
*
*/
public class OdeRedirectServlet extends OdeServlet {
@Override
public void service(HttpServletRequest req, HttpServletResponse res) throws IOException {
if (req.getHeader("user-agent").contains("Android")) {
res.sendRedirect(ServerLayout.ODE_BASEURL + ServerLayout.ANDROID_SERVLET);
} else {
res.sendRedirect(ServerLayout.ODE_BASEURL + Server.START_PAGE);
}
res.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
}
}
......@@ -298,28 +298,6 @@
<servlet-name>firebaseAuthService</servlet-name>
</filter-mapping>
<!-- Not sure what needs to replace GwtResourceServlet
<servlet>
<servlet-name>odeUiServlet</servlet-name>
<servlet-class>com.google.gwt.gserver.GwtResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>odeUiServlet</servlet-name>
<url-pattern>/ode/*</url-pattern>
</servlet-mapping>
-->
<!-- Not sure what to do about the redirect servlet
<servlet>
<servlet-name>odeRedirectServlet</servlet-name>
<servlet-class>com.google.appinventor.server.OdeRedirectServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>odeRedirectServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
-->
<!-- TODO: Optionally add a <welcome-file-list> tag to display a welcome file. -->
<!-- components -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment