title: Accessing uploaded file in Apache Tapestry page
body: <p>I'm using Apache Tapestry v5.3.7 and I already use the normal Tapestry upload component in a form. For a better user experience I try now to integrate Dropzone.js in a normal Tapestry page without any form. The JavaScript integration works fine. The uploaded file data are transferred to my server with a post request and I can access the request with all of its parameters.</p>
  
  <p>My question is now how can I access the binary data of the uploaded file (maybe as InputStream) to save them in my system? I already injected the http request but getInputStream returns a empty stream.</p>
  
  <p>Thanks for any suggestions</p>
  
  <pre><code>/** Code snippet of page java part */
  ...
  
  @Inject
  protected HttpServletRequest _request;
  
  public void onActivate (String rowId) {
      String fileName=_request.getParameter("file");
      try {
          InputStream is=_request.getInputStream();
          // if I do read from is it returns -1
          // :-(
          doSomeSaveStuff(is); // dummy code
      }
      catch(Exception e) {
          e.printStackTrace();
      }
  }
  
  ...
  </code></pre>