Servlet File upload Oreily MultipartParser problems

2001-07-07 Thread Randy Paries

Hello,

does anyone have the Oreily MultipartParser file upload working with Tomcat
and apache on Linux.

I have developed this upload servlet using Jbuilder 4 and Win2000. The
servlet works with the Jbuilder debugger(tomcat 3.1) and jrun. But is does
work when I push it to my production linux box.

When I execute the form to upload the image on the linux box, the form just
hangs.

what is strange is that every time
ServletInputStream in = req.getInputStream();
is called I get a Y printed on the console.

Do anyone have this working on the linux config?

has anyone seen a similar problem?

Thanks

Randy





Re: Servlet File upload Oreily MultipartParser problems

2001-07-07 Thread Peter Davison

I've got it to work on Linux but only using Tomcat stand-alone, not with
apache.

If I understand correctly, you are getting the input stream from the
request directly - req.getInputStream().

My understanding on how the MultipartParser works is that you instantiate 
a MultipartParser giving it the request, then iterate through the parts handling
the ParamParts one way and the FileParts another.  Something like:

MultipartParser mp = new MultipartParser(request, ...)
Part p = null;
while ((p = mp.readNextPart()) != null)
{
if p is a paramPart ...
else if p is a filePart
{
FilePart fp = (FilePart) p;
InputStream is = fp.getInputStream();

}
}

So each FilePart has it's own inputStream.

Not sure what the Ys you are seeing mean, but the above works for me.

Regards,
Pete.
Thus spake Randy Paries [EMAIL PROTECTED] on Sat, 7 Jul 2001 09:11:53 -0500:

RP Hello,
RP 
RP does anyone have the Oreily MultipartParser file upload working with Tomcat
RP and apache on Linux.
RP 
RP I have developed this upload servlet using Jbuilder 4 and Win2000. The
RP servlet works with the Jbuilder debugger(tomcat 3.1) and jrun. But is does
RP work when I push it to my production linux box.
RP 
RP When I execute the form to upload the image on the linux box, the form just
RP hangs.
RP 
RP what is strange is that every time
RP ServletInputStream in = req.getInputStream();
RP is called I get a Y printed on the console.
RP 
RP Do anyone have this working on the linux config?
RP 
RP has anyone seen a similar problem?
RP 
RP Thanks
RP 
RP Randy
RP 



RE: Servlet File upload Oreily MultipartParser problems

2001-07-07 Thread Randy Paries

I found out what it was

in jBuilder I was using tomcat but ajp12

in production i was using ajp13

I upgrading the linux box to tomcat 3.2.2 and life is fine again.

Thanks

-Original Message-
From: Peter Davison [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 11:16 AM
To: [EMAIL PROTECTED]
Subject: Re: Servlet File upload Oreily MultipartParser problems


I've got it to work on Linux but only using Tomcat stand-alone, not with
apache.

If I understand correctly, you are getting the input stream from the
request directly - req.getInputStream().

My understanding on how the MultipartParser works is that you instantiate
a MultipartParser giving it the request, then iterate through the parts
handling
the ParamParts one way and the FileParts another.  Something like:

MultipartParser mp = new MultipartParser(request, ...)
Part p = null;
while ((p = mp.readNextPart()) != null)
{
if p is a paramPart ...
else if p is a filePart
{
FilePart fp = (FilePart) p;
InputStream is = fp.getInputStream();

}
}

So each FilePart has it's own inputStream.

Not sure what the Ys you are seeing mean, but the above works for me.

Regards,
Pete.
Thus spake Randy Paries [EMAIL PROTECTED] on Sat, 7 Jul 2001
09:11:53 -0500:

RP Hello,
RP
RP does anyone have the Oreily MultipartParser file upload working with
Tomcat
RP and apache on Linux.
RP
RP I have developed this upload servlet using Jbuilder 4 and Win2000. The
RP servlet works with the Jbuilder debugger(tomcat 3.1) and jrun. But is
does
RP work when I push it to my production linux box.
RP
RP When I execute the form to upload the image on the linux box, the form
just
RP hangs.
RP
RP what is strange is that every time
RP ServletInputStream in = req.getInputStream();
RP is called I get a Y printed on the console.
RP
RP Do anyone have this working on the linux config?
RP
RP has anyone seen a similar problem?
RP
RP Thanks
RP
RP Randy
RP