title: combining blob servlet with endpoint api
body: <p>Here is my <code>web.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
      &lt;servlet&gt;
      &lt;servlet-name&gt;Upload&lt;/servlet-name&gt;
      &lt;servlet-class&gt;Upload&lt;/servlet-class&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Upload&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/upload&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;SystemServiceServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.google.api.server.spi.SystemServiceServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;services&lt;/param-name&gt;
              &lt;param-value&gt;com.company.game.GameApi&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;SystemServiceServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/_ah/spi/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I have a Google Cloud Endpoint api, GameApi, which had been working fine except for the loading of blobs which was taking too long. So I decide to use the <a href="https://developers.google.com/appengine/docs/java/blobstore/overview#Complete_Sample_App" rel="nofollow"><code>Upload</code> servlet on the google website to upload my blobs from user</a>. I basically added the xml code for the blob file to my existing xml code for the endpoint api, resulting in the xml shown above. But then the Upload servlet is never called. I am testing on localhost and I can see in the <code>_BlobUploadSession_</code> table that the front-end (i.e. android app) has successfully sent the image to the blobstore with the correct callback url. I know that the servlet is not being called because I have a println statement right at the entrance.</p>
  
  <p>Do I need to change my <code>web.xml</code>? Am I allowed to combine endpoint with servlet as I am doing in my <code>web.xml</code>?</p>