----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hi:

I am running in a split environment where I have Linux web servers
(Intel RH6.1) running Apache 1.3.9 using DSO and application servers
running Sun e250 on Solaris 2.7 with the JServ daily build of 19991227.

If I run with my configuration with Apache and JServ on a single server,
RH or Solaris, I never have problems with doing multipart form reads.
However, when I have Apache on one server and JServ/JVM on another for
load balancing, I never see an EOF while reading in the input stream.

My code basically boils down to this:

  private void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
      String contentType = req.getContentType();
      if (contentType != null &&
        contentType.equals("multipart/form-data")) {
         byte[] b = new byte[4096];
         InputStream is = req.getInputSteam();

         int len = 0;
         StringBuffer sb = new StringBuffer();

         while( (len = is.read(b)) != -1) {
            sb.append(new String(b));
         }
         String ret = sb.toString();

      }

In our case, we never see the EOF, so we never exit the read loop.  This
is very troubling as we depend on file upload for some of the site
features.  The only thing I can imagine is that JServ is munging the
input stream somewhere (probably in the mod_jserv side).  Does the
req.getContentType() cause the InputStream to be read in?

Please help me out if you have see this before.

-MA





--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to