Re: multipart requests

2001-10-19 Thread Shiv Kumar MN

Hello,

We had same problem while using Tomcat v3.2. If you are using AJP13 in
your installation of TC, then that must be the problem. If so, switch to AJP12
then multipart starts working.

Cheers,
  - Shiv.

Mangi, Rick wrote:

 It's an O'Reilly book by Hunter  Crawford. The O'Reilly servlet package
 (com.oreilly.servlet) is the code
 that goes along with the book.

 -Original Message-
 From: Matt Dilley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: multipart requests

 Mark Muffett wrote:

 Matt
 
 I used the O'reilly packages and they worked fine (I did the example from
 Java Servlet Programming, then adapted it) - what's your conguration and
 what errors do you get ?
 
 Mark Muffett
 
 - Original Message -
 From: Matt Dilley [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 17, 2001 3:24 PM
 Subject: multipart requests
 
 
 hi
 
 Does anyone know where I can get hold of a multipart request servlet
 that will allow me to upload .jpg and .gif image files to the jsp server?
 
 I have tried the o'reilly packages, but it always failes to upload any
 image files
 
 Many thanks
 
 Matt
 
 
 
 
 java servlet programming?
 where can I find that?




Re: multipart requests

2001-10-18 Thread Matt Dilley

Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example from
Java Servlet Programming, then adapted it) - what's your conguration and
what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




java servlet programming?
where can I find that?





RE: multipart requests

2001-10-18 Thread James Yap


If you don't have a copy but would like to have a peek at the examples,
here's the link
http://www.servlets.com/jservlet2/examples/index.html


 It's an O'Reilly book by Hunter  Crawford. The O'Reilly servlet
 package (com.oreilly.servlet) is the code
 that goes along with the book.


 -Original Message-
 From: Matt Dilley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: multipart requests


 Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example
from Java Servlet Programming, then adapted it) - what's your
conguration and what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp
server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




 java servlet programming?
 where can I find that?






RE: multipart requests

2001-10-18 Thread Mangi, Rick

But keep in mind that the license for the com.oreilly.servlet code requires
that you own the book...

-Original Message-
From: James Yap [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 11:56 AM
To: [EMAIL PROTECTED]
Subject: RE: multipart requests



If you don't have a copy but would like to have a peek at the examples,
here's the link
http://www.servlets.com/jservlet2/examples/index.html


 It's an O'Reilly book by Hunter  Crawford. The O'Reilly servlet
 package (com.oreilly.servlet) is the code
 that goes along with the book.


 -Original Message-
 From: Matt Dilley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:34 AM
 To: [EMAIL PROTECTED]
 Subject: Re: multipart requests


 Mark Muffett wrote:

Matt

I used the O'reilly packages and they worked fine (I did the example
from Java Servlet Programming, then adapted it) - what's your
conguration and what errors do you get ?

Mark Muffett

- Original Message -
From: Matt Dilley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 3:24 PM
Subject: multipart requests


hi

Does anyone know where I can get hold of a multipart request servlet
that will allow me to upload .jpg and .gif image files to the jsp
server?

I have tried the o'reilly packages, but it always failes to upload any
image files

Many thanks

Matt




 java servlet programming?
 where can I find that?





RE: multipart requests and file uploads problems on the Apache connection

2001-04-12 Thread Sandy McPherson

You need tp use Ajp12 for multipart request servlets.
Just specify something like this
#
# The following line mounts all JSP files and the /spqr/servlet/ uri to
tomcat
#
JkMount /spqr/servlet/* ajp13
JkMount /spqr/servlet/LogoUpload ajp12 # Ajp13 won't handle the multi-part
request properly
JkMount /spqr/*.jsp ajp13

I believe there is a patch somewhere in the CVS repository, but seeing as we
Upload Files once in a blue-moon, and the "slower" Ajp12 does the job, I
haven't bothered. Never fix a running system!

Sandy

 -Original Message-
 From: Bard [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, April 08, 2001 4:19 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: multipart requests and file uploads problems on the Apache
 connection


 Hello Sandy McPherson,


 Sorry to be mailing you directly, but I've had exactly the problems you
 described in you posting

 (http://archive.covalent.net/jakarta/tomcat-user/2000/12/0612.xml)

 and have been trying to find an answer for weeks now. Have you found out
 how Apache+mod_jk+tomcat can be configured properly to allow binary file
 uploads using servlets or JSPs? I tried the code that uses
 PerTools as well
 as several other variations with exactly the same "infinite loop" of
 "Y"s appearing in the console where tomcat was started.

 Very frustrated,

 Bard






RE: multipart requests and file uploads problems on the Apache connection

2000-12-08 Thread CPC Livelink Admin

That's interesting, since I've been doing that for some time now with no
issues.

-Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 03:20 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
connection


-BEGIN PGP SIGNED MESSAGE-

Hi, everybody! Unfortunately, it seems that there is an important limitation
when  using Jason's components. The developer cant mix text fields and file
setting fields in the form!
Good luck,

José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://euclides.8m.com


- -Mensagem original-
De: Joe Laffey [SMTP:[EMAIL PROTECTED]]
Enviada em: Quinta-feira, 7 de Dezembro de 2000 13:50
Para:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto:Re: multipart requests and file uploads problems on
the Apache connection

Take a look at the multipart classes by Jason Hunter that are free for use
if you own the book "Java Servlet Programming" from O'Reilly. The code can
be downloaded from O'Reilly's site www.ora.com

I have only had one problem with it, and I think I have coded around it.
The problem was that sometimes uploads from MSIE 5.01 Win do not send the
boundary correctly (it varies by two characters everytime).


Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
- -
With no walls or fences on the Internet, who needs Windows or Gates?
- -
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1

iQCVAwUBOjFcat0YhuJ3BUxtAQEO+QP+LW4a8HpIGlHQr1Mpj0IGbkuwwVBXGpR4
0g4iWIGJXn5hmAFkyC35jZTokqqw8AM1+u77jLlKPt9lHeohrSyXLPwWCmWrSiKR
bDGHJ9Z/i3eZw4QF+se7dvjfGR1IdJLRgqDmVAwIF40GPICtcpMxefGzN3KfjLzx
U9DdkA2DJMU=
=ddTy
-END PGP SIGNATURE-




RE: multipart requests and file uploads problems on the Apache c onnection

2000-12-08 Thread Josh Knowles

I have had no problems mixing the two

-Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:20 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
c onnection


-BEGIN PGP SIGNED MESSAGE-

Hi, everybody! Unfortunately, it seems that there is an important limitation
when  using Jason's components. The developer cant mix text fields and file
setting fields in the form!
Good luck,

José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] 
[EMAIL PROTECTED]
http://euclides.8m.com


- -Mensagem original-
De: Joe Laffey [SMTP:[EMAIL PROTECTED]]
Enviada em: Quinta-feira, 7 de Dezembro de 2000 13:50
Para:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto:Re: multipart requests and file uploads problems on
the Apache connection

Take a look at the multipart classes by Jason Hunter that are free for use
if you own the book "Java Servlet Programming" from O'Reilly. The code can
be downloaded from O'Reilly's site www.ora.com

I have only had one problem with it, and I think I have coded around it.
The problem was that sometimes uploads from MSIE 5.01 Win do not send the
boundary correctly (it varies by two characters everytime).


Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
- -
With no walls or fences on the Internet, who needs Windows or Gates?
- -
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1

iQCVAwUBOjFcat0YhuJ3BUxtAQEO+QP+LW4a8HpIGlHQr1Mpj0IGbkuwwVBXGpR4
0g4iWIGJXn5hmAFkyC35jZTokqqw8AM1+u77jLlKPt9lHeohrSyXLPwWCmWrSiKR
bDGHJ9Z/i3eZw4QF+se7dvjfGR1IdJLRgqDmVAwIF40GPICtcpMxefGzN3KfjLzx
U9DdkA2DJMU=
=ddTy
-END PGP SIGNATURE-



Re: multipart requests and file uploads problems on the Apache c onnection

2000-12-08 Thread Steve Ruby


I agree, works fine for me, make sure you are trying to read the
non-file parameters with the multipart reader and not just with the
method from Tomcat.. Once the user sends the mime post the whole
thing is mime not just the file...


 Chris Halverson wrote:
 
 NT4.0, Solaris 2.6 and Solaris 2.8 work fine too as you would expect.
 
  -Original Message-
  From:   Josh Knowles [SMTP:[EMAIL PROTECTED]]
  Sent:   Friday, December 08, 2000 2:15 PM
  To: '[EMAIL PROTECTED]'
  Subject:RE: multipart requests and file uploads problems
  on the Apache c  onnection
 
  Java is Java no matter what OS you are running on.  I have used
  the
  multipart on both RedHat 6.2 and Win2k with no problems.
 
  -Original Message-
  From: Jose Euclides da Silva Junior - DIGR.O
  [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 08, 2000 1:57 PM
  To: [EMAIL PROTECTED]
  Subject: RES: multipart requests and file uploads problems on the
  Apache
  c onnection
 
  -BEGIN PGP SIGNED MESSAGE-
 
  Even in NT environment? Thank you.
 
  José Euclides Júnior
  __
  E-mail: [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  http://euclides.8m.com
 
  - -Mensagem original-
  De: Josh Knowles
  [SMTP:[EMAIL PROTECTED]]
  Enviada em: Sexta-feira, 8 de Dezembro de 2000 18:45
  Para:   '[EMAIL PROTECTED]'
  Assunto:RE: multipart requests and file uploads
  problems on
  the Apache c  onnection
 
  I have had no problems mixing the two
 
  - -Original Message-
  From: Jose Euclides da Silva Junior - DIGR.O
  [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 08, 2000 12:20 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: RES: multipart requests and file uploads problems on the
  Apache
  c onnection
 
  *** PGP Signature Status: bad
  *** Signer: Jose Euclides Jr
  [EMAIL PROTECTED]
  *** Signed: 08/12/00 16:10:50
  *** Verified: 08/12/00 17:46:20
  *** BEGIN PGP VERIFIED MESSAGE ***
 
  Hi, everybody! Unfortunately, it seems that there is an important
  limitation
  when  using Jason's components. The developer cant mix text
  fields and file
  setting fields in the form!
  Good luck,
 
  José Euclides Júnior
  __
  E-mail: [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  http://euclides.8m.com
 
  - -Mensagem original-
  De: Joe Laffey [SMTP:[EMAIL PROTECTED]]
  Enviada em: Quinta-feira, 7 de Dezembro de 2000 13:50
 
  Para:   [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Assunto:Re: multipart requests and file uploads
  problems on
  the Apache connection
 
  Take a look at the multipart classes by Jason Hunter that are
  free for use
  if you own the book "Java Servlet Programming" from O'Reilly. The
  code can
  be downloaded from O'Reilly's site www.ora.com
 
  I have only had one problem with it, and I think I have coded
  around it.
  The problem was that sometimes uploads from MSIE 5.01 Win do not
  send the
  boundary correctly (it varies by two characters everytime).
 
  Joe Laffey
  LAFFEY Computer Imaging
  St. Louis, MO
  - -
  With no walls or fences on the Internet, who needs Windows or
  Gates?
  -
  -
 
  *** END PGP VERIFIED MESSAGE ***
 
  -BEGIN PGP SIGNATURE-
  Version: PGP 6.5.1
 
  iQCVAwUBOjFzD90YhuJ3BUxtAQHrWwP+Maxhw3z2IBXwKg6J2DQdMlZGkwPVuJDN
  d9CcksGgRHSaHR53p79VkXzceTC9acNITocFfiowpONKYhQOStGnQ/31fDFXMfbE
  NBksfaubs8rUKf1TipRHvU9AVkTmI6mf7BuzI4ycmqKsanbLDMEM9TSG4CjG6PAp
  McRn2ZG88hI=
  =/TtX
  -END PGP SIGNATURE-



RE: multipart requests and file uploads problems on the Apache c onnection

2000-12-08 Thread Josh Knowles

Java is Java no matter what OS you are running on.  I have used the
multipart on both RedHat 6.2 and Win2k with no problems.

-Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 1:57 PM
To: [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
c onnection


-BEGIN PGP SIGNED MESSAGE-

Even in NT environment? Thank you.

José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] 
[EMAIL PROTECTED]
http://euclides.8m.com


- -Mensagem original-
De: Josh Knowles [SMTP:[EMAIL PROTECTED]]
Enviada em: Sexta-feira, 8 de Dezembro de 2000 18:45
Para:   '[EMAIL PROTECTED]'
Assunto:RE: multipart requests and file uploads problems on
the Apache c  onnection

I have had no problems mixing the two

- -Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:20 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
c onnection



*** PGP Signature Status: bad
*** Signer: Jose Euclides Jr [EMAIL PROTECTED] 
*** Signed: 08/12/00 16:10:50
*** Verified: 08/12/00 17:46:20
*** BEGIN PGP VERIFIED MESSAGE ***

Hi, everybody! Unfortunately, it seems that there is an important limitation
when  using Jason's components. The developer cant mix text fields and file
setting fields in the form!
Good luck,

José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] 
[EMAIL PROTECTED]
http://euclides.8m.com


- -Mensagem original-
De: Joe Laffey [SMTP:[EMAIL PROTECTED]]
Enviada em: Quinta-feira, 7 de Dezembro de 2000 13:50
Para:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto:Re: multipart requests and file uploads problems on
the Apache connection

Take a look at the multipart classes by Jason Hunter that are free for use
if you own the book "Java Servlet Programming" from O'Reilly. The code can
be downloaded from O'Reilly's site www.ora.com

I have only had one problem with it, and I think I have coded around it.
The problem was that sometimes uploads from MSIE 5.01 Win do not send the
boundary correctly (it varies by two characters everytime).


Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
- -
With no walls or fences on the Internet, who needs Windows or Gates?
- -

*** END PGP VERIFIED MESSAGE ***

-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1

iQCVAwUBOjFzD90YhuJ3BUxtAQHrWwP+Maxhw3z2IBXwKg6J2DQdMlZGkwPVuJDN
d9CcksGgRHSaHR53p79VkXzceTC9acNITocFfiowpONKYhQOStGnQ/31fDFXMfbE
NBksfaubs8rUKf1TipRHvU9AVkTmI6mf7BuzI4ycmqKsanbLDMEM9TSG4CjG6PAp
McRn2ZG88hI=
=/TtX
-END PGP SIGNATURE-



RE: multipart requests and file uploads problems on the Apache c onnection

2000-12-08 Thread Chris Halverson
Title: RE: multipart requests and file uploads problems on the Apache c  onnection





NT4.0, Solaris 2.6 and Solaris 2.8 work fine too as you would expect.


-Original Message-
From: Josh Knowles [SMTP:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 2:15 PM
To: '[EMAIL PROTECTED]'
Subject: RE: multipart requests and file uploads problems on the Apache c onnection


Java is Java no matter what OS you are running on. I have used the
multipart on both RedHat 6.2 and Win2k with no problems.


-Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 1:57 PM
To: [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
c onnection



-BEGIN PGP SIGNED MESSAGE-


Even in NT environment? Thank you.


José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]
http://euclides.8m.com



- -Mensagem original-
De:  Josh Knowles [SMTP:[EMAIL PROTECTED]]
Enviada em:  Sexta-feira, 8 de Dezembro de 2000 18:45
Para:  '[EMAIL PROTECTED]'
Assunto:  RE: multipart requests and file uploads problems on
the Apache c onnection


I have had no problems mixing the two


- -Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 12:20 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: multipart requests and file uploads problems on the Apache
c onnection




*** PGP Signature Status: bad
*** Signer: Jose Euclides Jr [EMAIL PROTECTED] 
*** Signed: 08/12/00 16:10:50
*** Verified: 08/12/00 17:46:20
*** BEGIN PGP VERIFIED MESSAGE ***


Hi, everybody! Unfortunately, it seems that there is an important limitation
when using Jason's components. The developer cant mix text fields and file
setting fields in the form!
Good luck,


José Euclides Júnior
__
E-mail: [EMAIL PROTECTED]
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]
http://euclides.8m.com



- -Mensagem original-
De:  Joe Laffey [SMTP:[EMAIL PROTECTED]]
Enviada em:  Quinta-feira, 7 de Dezembro de 2000 13:50
Para:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto:  Re: multipart requests and file uploads problems on
the Apache connection


Take a look at the multipart classes by Jason Hunter that are free for use
if you own the book Java Servlet Programming from O'Reilly. The code can
be downloaded from O'Reilly's site www.ora.com


I have only had one problem with it, and I think I have coded around it.
The problem was that sometimes uploads from MSIE 5.01 Win do not send the
boundary correctly (it varies by two characters everytime).



Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
- -
With no walls or fences on the Internet, who needs Windows or Gates?
- -


*** END PGP VERIFIED MESSAGE ***


-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1


iQCVAwUBOjFzD90YhuJ3BUxtAQHrWwP+Maxhw3z2IBXwKg6J2DQdMlZGkwPVuJDN
d9CcksGgRHSaHR53p79VkXzceTC9acNITocFfiowpONKYhQOStGnQ/31fDFXMfbE
NBksfaubs8rUKf1TipRHvU9AVkTmI6mf7BuzI4ycmqKsanbLDMEM9TSG4CjG6PAp
McRn2ZG88hI=
=/TtX
-END PGP SIGNATURE-





Re: multipart requests and file uploads problems on the Apache connection

2000-12-07 Thread Sandy McPherson

Sandy McPherson wrote:

Looks like the Ajp13 is screwing up! The stuff works properly when I set the servlet 
protocol to Ajp12


 Hi

 I am running Tomcat 3.2 and Apache 1.3.12.

 I get some funny behaviour when uploading a file through the
 apache/tomcat connection. It looks like the input stream is broken.

 The output from Tomcat looks like

 Using classpath:
 
/usr/local/tomcat/lib/ant.jar:/usr/local/tomcat/lib/jasper.jar:/usr/local/tomcat/lib/servlet.jar:/usr/local/tomcat/lib/test:/usr/local/tomcat/lib/webserver.jar:/usr/java/jdk/lib/tools.jar:/usr/java/jsse/lib/jcert.jar:/usr/java/jsse/lib/jsse.jar:/usr/java/jsse/lib/jnet.jar:/usr/java/jaxp/jaxp.jar:/usr/java/jaxp/parser.jar:/usr/java/jdk/bin

 Starting tomcat. Check logs/tomcat.log for error messages

  upload GIF using http://localhost:8080/spqr/servlet/LogoUpload

 LogoUpload.service: begin
 LogoUpload.service: reading file
 LogoUpload.service: reading new block len = 5283,5283
 LogoUpload.service: reading file completed
 LogoUpload.service: file is GIF
 LogoUpload.service: looking for footer
 LogoUpload.service: found footer
 LogoUpload.service: end

  upload GIF using http://localhost/spqr/servlet/LogoUpload i.e.
 over

 LogoUpload.service: begin
 LogoUpload.service: reading file
 Y
 LogoUpload.service: reading new block len = 340,340
 Y
 LogoUpload.service: reading new block len = 0,340
 Y
 LogoUpload.service: reading new block len = 0,340
 Y
 ...
 LogoUpload.service: reading new block len = 0,340
 Y

 in an infinite loop!

 My code  (attached) does not print the Y anywhere that I can see!

 The Apache httpd.conf file is out of the box with the mod_jk.conf.spqr
 (attached) file included right at
 the end.

 Do I have to configure anything in Apache to get it to pass the
 multi-part request without mangling it?
 Thanks
 Sandy

   
 package com.mapquest.spqr.db;

 import java.io.*;
 import java.net.*;
 import java.util.*;

 import javax.servlet.*;
 import javax.servlet.http.*;

 import com.oroinc.text.perl.*;

 public class LogoUpload extends HttpServlet
 {
public static final int maxFileSize=65535;
String[] getFileTypes( )
{
   return new String[] {".gif",".jpg", ".jpeg" };
}
public void service( HttpServletRequest _req, HttpServletResponse _res )
   throws ServletException, IOException
{
   System.out.println( "LogoUpload.service: begin" );
   Client client = (Client)_req.getSession( ).getAttribute( "client" );
   if ( client == null )
   {
  throw new ServletException( "No bean called \"client\" in session" 
);
   }
   String user=client.getUser( );
   //
   // Input and Output streams
   //
   InputStream is = _req.getInputStream();
   //
   // Temporary ByteArray.The initial size is set to 8164.
   // A large initial size improves performance.
   //
   ByteArrayOutputStream bos = new ByteArrayOutputStream(8164);

   //
   // The files total length,including header and footer
   //
   int TotLen=0;
   int HeaderLen=0;
   int FooterLen=0;

   //
   // byte array for read
   //
   byte[] b = new byte[8164];
   int len=0;

   //
   // Read the InputStream and store it in 'bos'.
   //
   System.out.println( "LogoUpload.service: reading file" );
   try
   {
  while( ((len = is.read(b,0,8164)) != -1)  TotLen = maxFileSize )
  {
 bos.write(b,0,len);

 TotLen += len;
 System.out.println( "LogoUpload.service: reading new block 
len = "+len + "," +TotLen );
  }
  is.close();
  System.out.println( "LogoUpload.service: reading file completed" );
   }
   catch(IOException e)
   {
  System.out.println( "LogoUpload.service: upload failed" );
  throw new ServletException( "File upload failed", e );
   }

   if ( TotLen  maxFileSize )
   {
  System.out.println( "LogoUpload.service: file too big" );
  getServletContext( )
 .getRequestDispatcher("/"+client.getDefaultLanguage( 
)+"/logo-big.jsp")
 .forward( _req, _res );
  return;
   }

   String fileExtension = null;
   try
   {
  String GIFRegex = "/Content-Type: image/gif\r\n\r\n/";
  String PJPEGRegex = "/Content-Type: image/pjpeg\r\n\r\n/";
  String JPEGRegex = "/Content-Type: image/jpeg\r\n\r\n/";
  String JPGRegex = "/Content-Type: image/jpg\r\n\r\n/";
  String FooterRegex =