title: Google App Engine servlet only accessible on localhost
body: <p><strong>Java Code</strong></p>
  
  <pre><code>package com.practice;
  
  import java.io.IOException;
  import javax.ws.rs.GET;
  import javax.ws.rs.Produces;
  import javax.ws.rs.Path;
  import javax.ws.rs.core.MediaType;
  import com.google.gson.Gson;
  import com.google.gson.JsonObject;
  
  @Path("")
  public class Hello{
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      @Path("/keyboard")
      public String getkeyboard() {
          Gson gson=new Gson();
          JsonObject json = new JsonObject();
          json.addProperty("type", "text");
          return gson.toJson(json);
      }
  }
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
    &lt;servlet&gt;
      &lt;servlet-name&gt;Hello&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;jersey.config.server.provider.packages&lt;/param-name&gt;
        &lt;param-value&gt;com.Practice&lt;/param-value&gt;
      &lt;/init-param&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Hello&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>When I run the code on a local server (with Eclipse Jetty) and go to <code>localhost:8080/keyboard</code> it works fine and displays <code>{"type":"text"}</code>.</p>
  
  <p>But when I deploy it to google app engine and go to <code>https://(app_url)/keyboard</code>, it gives me a 404 not found error. But then again, <code>https://(app_url)</code> gives me the welcome page just fine.</p>
  
  <p>So I don't have the slightest idea why <code>https://(app_url)/keyboard</code> doesn't work.</p>
  
  <p>How do I fix this?</p>