2 Replies Latest reply on Jan 10, 2009 12:26 PM by Ronald van Kuijk

    Binary content through Servlet: How to Bypass AJAX4JSF filer?

    Raj Tiwari Newbie

      Folks,
      I have a servlet in my seam app that handles binary content. It is configured in my web.xml as follows:



         <servlet>
              <servlet-name>ContentAccess</servlet-name>
              <servlet-class>com.sharon.session.servlets.ContentServlet</servlet-class>
              <load-on-startup>2</load-on-startup>
          </servlet>
          <servlet-mapping>
              <servlet-name>ContentAccess</servlet-name>
              <url-pattern>/content/*</url-pattern>
          </servlet-mapping>



      In my servlet I spit large files at clients.


      I am observing that my clients don't see any data until the entire file has been downloaded. No amount of flushing the servlet's output stream or calling flushBuffer() on servlet's response seems to do anything.


      On debugging, I find that my response is being handled by some org.ajax4jsf.webapp.FilterServletResponseWrapper which is likely the culprit.


      Does anyone know how I can speed up my servlet. I really don't need any kind of parsing/processing for my data on the way out.


      Thanks.-Raj