RE: File upload location.

2005-01-18 Thread Pawson, David
 

-Original Message-
From: Francois JEANMOUGIN 
That's why I use catalina.base and catalina.home (CATALINA_BASE and
CATALINA_HOME) as described in RUNNING.txt so that tomcat 
installation is independent of webapps installtion. I just 
have to take care about syntax incompatibility in 
server.xml (for example).

The method is described in
(4) Advanced Configuration - Multiple Tomcat 5 Instances 
from RUNNING.txt. 

Using this binary separation will allow you to upgrade 
smoothly without loosing data or long service interruption problem.

That says,
"When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will
calculate all relative references for files in the following directories based
on the value of $CATALINA_BASE instead of $CATALINA_HOME:"

So in using

/tc5028/webapps/repository/data/ 

If catalina base is set to /elsewhere,
then all the configuration files and my application code will be there too?

in /elsewhere/webapps/repository/data

and CATALINA_HOME can still point to /tomcat5028.  

Yes, that all makes sense.

Francois, you also note "I just have to take care about syntax incompatibility 
in server.xml (for example)."

Quick look, and I can't see anything that has path problems there?
Can you explain please?


regards DaveP

** snip here **



 

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload location.

2005-01-18 Thread Francois JEANMOUGIN
That's why I use catalina.base and catalina.home (CATALINA_BASE and
CATALINA_HOME) as described in RUNNING.txt so that tomcat installation is
independent of webapps installtion. I just have to take care about syntax
incompatibility in server.xml (for example).

The method is described in 
(4) Advanced Configuration - Multiple Tomcat 5 Instances
from RUNNING.txt. 

Using this binary separation will allow you to upgrade smoothly without
loosing data or long service interruption problem.

> -Original Message-
> From: Pawson, David [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 18, 2005 12:21 PM
> To: tomcat-user@jakarta.apache.org
> Subject: File upload location.
> 
> I've an servlet running from
> /tc5028/webapps/repository
> 
> and I'm storing client data in
> /tc5028/webapps/repository/data/
> 
> I'm curious what strategy people adopt when
> upgrading. I'm thinking of moving up to java 1.5
> and the more recent tomcat, do people overwrite
> the tc installation or move everything to a new
> /tc55 directory. That would allow testing prior
> to going live.
> 
> That's inconvenient to say the least with a few
> gigs of data to move, but seemingly necessary.
> 
> what do others do please?
> 
> 
> regards DaveP
> 

* snip here *

Décharge / Disclaimer

Ce message et toutes les pièces jointes (ci-après le "message") sont 
confidentiels et établis à l'intention exclusive des destinataires. Toute 
utilisation ou diffusion non autorisée est interdite. Tout message électronique 
étant susceptible d'altération, 123Multimédia et ses filiales déclinent toute 
responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.

This message and any attachments (the "message") are confidential and intended 
solely for the addressees. Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration. Therefore neither 123Multimédia nor any 
of its subsidiaries or affiliates shall be liable for the message if altered, 
changed or falsified.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload

2004-11-02 Thread Allistair Crossley
Hi Derrick

I have added a comment to this bug that links to the original bug report thread that I 
was on when I was getting this. This problem was fixed back in May and a release was 
made, but some people were still getting it. I recently built the isapi DLL from CVS 
head and it fixed all our known instances of this problem. 

I can email you the DLL if you provide your address,

Cheers, AC

> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: 29 October 2004 22:54
> To: Tomcat Users List; Struts User Apache (E-mail)
> Subject: RE: File upload
> 
> 
> 
> For anyone who is interested, I found this interesting bug report on
> bugzilla describing the problem.  Does anyone know a 
> workaround for IIS
> adding 35 bytes?
> 
>  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26890
> 
> 
> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 28, 2004 2:27 PM
> To: Tomcat Users List; Struts User Apache (E-mail)
> Subject: RE: File upload
> 
>  
> Upon reviewing some struts code and documentation, the memory 
> threshold
> for a file to be parsed for upload is 256K (configurable).  
> If the file
> is over that size, I believe the uploader puts it in a temp file.
> However, since the "url" to retrieve it for parsing is a 
> relative path,
> the parser cannot find it.
> 
> Can anyone verify this?
> 
> Thanks,
> Derrick
> 
> 
> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 28, 2004 11:52 AM
> To: Tomcat Users List
> Subject: File upload
> 
> 
> Configuration:
> 
> Tomcat 5.0.24
> IIS 5.0
> JK2 connector
> Isapi_redirector2.dll
> Struts 1.1
> Commons file upload 1.0
> 
> 
> I seem to have an issue that when the file is a certain size it is
> written to a temp file on the file system before it is parsed by the
> multipart parser (at least that's what the exception message 
> leads me to
> believe).  However, since the working directory is my web app
> (/WEB-INF/ilt), the parser can't seem to find the file (not a fully
> qualified file name).  This is a guess, but if correct I 
> don't know how
> to fix the problem.
> 
> Any help is appreciated.
> 
> Belows is the stack trace and data from the request dumper valve:
> 
> 2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> ===
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
> =/ilt/ilt/iltPerformUpload.do
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> contentLength=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> contentType=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPo
> rt=http://
> dkoesxp/djk/home/index.cfm?selectdTab=0
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFMX_JSESSIONID=c8301990451098975559821
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFID=19459
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept=text/xml,application/xml,application/xhtml+xml,t
> ext/html;q
> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-language=en-us,en;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=connection=keep-alive
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=host=dkoesxp
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=
> 3048D443AD
> 4341273FB5FED42958E7C4
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
> Gecko/20041001 Firefox/0.10.1
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnTo
> SkillPort=
> http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-length=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-type=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-encoding=gzip,deflate
> 2004-10-28 10:59:43 Req

RE: File upload

2004-10-29 Thread Derrick Koes

For anyone who is interested, I found this interesting bug report on
bugzilla describing the problem.  Does anyone know a workaround for IIS
adding 35 bytes?

 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26890


-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 2:27 PM
To: Tomcat Users List; Struts User Apache (E-mail)
Subject: RE: File upload

 
Upon reviewing some struts code and documentation, the memory threshold
for a file to be parsed for upload is 256K (configurable).  If the file
is over that size, I believe the uploader puts it in a temp file.
However, since the "url" to retrieve it for parsing is a relative path,
the parser cannot find it.

Can anyone verify this?

Thanks,
Derrick


-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 11:52 AM
To: Tomcat Users List
Subject: File upload


Configuration:

Tomcat 5.0.24
IIS 5.0
JK2 connector
Isapi_redirector2.dll
Struts 1.1
Commons file upload 1.0


I seem to have an issue that when the file is a certain size it is
written to a temp file on the file system before it is parsed by the
multipart parser (at least that's what the exception message leads me to
believe).  However, since the working directory is my web app
(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
qualified file name).  This is a guess, but if correct I don't know how
to fix the problem.

Any help is appreciated.

Belows is the stack trace and data from the request dumper valve:

2004-10-28 10:59:32 RequestDumperValve[/ilt]:
===
2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
=/ilt/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
contentType=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
dkoesxp/djk/home/index.cfm?selectdTab=0
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFMX_JSESSIONID=c8301990451098975559821
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFID=19459
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-language=en-us,en;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=connection=keep-alive
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=host=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
http://dkoesxp/djk/home/index.cfm?selectdTab=0;
CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-length=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-type=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-encoding=gzip,deflate
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=keep-alive=300
2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
protocol=HTTP/1.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteAddr=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteHost=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
requestedSessionId=3048D443AD4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverName=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverPort=80
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
servletPath=/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   isSecure=false
2004-10-28 10:59:4

RE: File upload

2004-10-28 Thread Derrick Koes
 
Just in case someone else runs into this, the tomcat workDir and the
struts-config tempDir property values MUST match.  Otherwise, files
greater than the threshold size (default 256K) won't be found for
parsing. 



-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 11:52 AM
To: Tomcat Users List
Subject: File upload


Configuration:

Tomcat 5.0.24
IIS 5.0
JK2 connector
Isapi_redirector2.dll
Struts 1.1
Commons file upload 1.0


I seem to have an issue that when the file is a certain size it is
written to a temp file on the file system before it is parsed by the
multipart parser (at least that's what the exception message leads me to
believe).  However, since the working directory is my web app
(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
qualified file name).  This is a guess, but if correct I don't know how
to fix the problem.

Any help is appreciated.

Belows is the stack trace and data from the request dumper valve:

2004-10-28 10:59:32 RequestDumperValve[/ilt]:
===
2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
=/ilt/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
contentType=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
dkoesxp/djk/home/index.cfm?selectdTab=0
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFMX_JSESSIONID=c8301990451098975559821
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFID=19459
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-language=en-us,en;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=connection=keep-alive
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=host=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
http://dkoesxp/djk/home/index.cfm?selectdTab=0;
CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-length=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-type=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-encoding=gzip,deflate
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=keep-alive=300
2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
protocol=HTTP/1.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteAddr=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteHost=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
requestedSessionId=3048D443AD4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverName=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverPort=80
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
servletPath=/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   isSecure=false
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
---
2004-10-28 10:59:43 StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed.
\WEB-INF\ilt\temp\upload_0001.tmp (The system cannot find the path
specified)
at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase
.java:429)
at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(Co
mmonsMultipartRequestHandler.java:

RE: File upload

2004-10-28 Thread Derrick Koes

Yep, taking IIS and the connector out of the picture produces the same
problem. 



  Derrick Koes
  Senior Software Engineer
  http://www.skillsoft.com"/>
  codeauthor2001
  [EMAIL PROTECTED]
  (603) 305-1753
  
  No, try not, do
or do not, there is no try.


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 11:56 AM
To: Tomcat Users List
Subject: RE: File upload


Hi,
First question, as always: does it work on Tomcat standalone, i.e.
removing IIS, JK2, and the redirector out of the mix (just for now, for
testing)?

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: Derrick Koes [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 28, 2004 11:52 AM
>To: Tomcat Users List
>Subject: File upload
>
>
>Configuration:
>
>Tomcat 5.0.24
>IIS 5.0
>JK2 connector
>Isapi_redirector2.dll
>Struts 1.1
>Commons file upload 1.0
>
>
>I seem to have an issue that when the file is a certain size it is 
>written to a temp file on the file system before it is parsed by the 
>multipart parser (at least that's what the exception message leads me
to
>believe).  However, since the working directory is my web app 
>(/WEB-INF/ilt), the parser can't seem to find the file (not a fully 
>qualified file name).  This is a guess, but if correct I don't know how

>to fix the problem.
>
>Any help is appreciated.
>
>Belows is the stack trace and data from the request dumper valve:
>
>2004-10-28 10:59:32 RequestDumperValve[/ilt]:
>===
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI 
>=/ilt/ilt/iltPerformUpload.do
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>contentType=multipart/form-data;
>boundary=---41184676334
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http:/
/
>dkoesxp/djk/home/index.cfm?selectdTab=0
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFMX_JSESSIONID=c8301990451098975559821
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFID=19459
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFTOKEN=98634115
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept=text/xml,application/xml,application/xhtml+xml,text/html;
q
>=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-language=en-us,en;q=0.5
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=connection=keep-alive
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=host=dkoesxp
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443A
D
>4341273FB5FED42958E7C4
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
>Gecko/20041001 Firefox/0.10.1
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort
=
>http://dkoesxp/djk/home/index.cfm?selectdTab=0;
>CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=content-length=340147
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=content-type=multipart/form-data;
>boundary=---41184676334
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-encoding=gzip,deflate
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=keep-alive=300
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>protocol=HTTP/1.1
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>remoteAddr=10.20.3.42
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>remoteHost=10.20.3.42
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>requestedSessionId=3048D443AD4341273FB5FED42958E7C4
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
>2004-10-28 10:59:43 RequestDum

RE: File upload

2004-10-28 Thread Derrick Koes
 
Upon reviewing some struts code and documentation, the memory threshold
for a file to be parsed for upload is 256K (configurable).  If the file
is over that size, I believe the uploader puts it in a temp file.
However, since the "url" to retrieve it for parsing is a relative path,
the parser cannot find it.

Can anyone verify this?

Thanks,
Derrick


-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 11:52 AM
To: Tomcat Users List
Subject: File upload


Configuration:

Tomcat 5.0.24
IIS 5.0
JK2 connector
Isapi_redirector2.dll
Struts 1.1
Commons file upload 1.0


I seem to have an issue that when the file is a certain size it is
written to a temp file on the file system before it is parsed by the
multipart parser (at least that's what the exception message leads me to
believe).  However, since the working directory is my web app
(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
qualified file name).  This is a guess, but if correct I don't know how
to fix the problem.

Any help is appreciated.

Belows is the stack trace and data from the request dumper valve:

2004-10-28 10:59:32 RequestDumperValve[/ilt]:
===
2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
=/ilt/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
contentType=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
dkoesxp/djk/home/index.cfm?selectdTab=0
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFMX_JSESSIONID=c8301990451098975559821
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFID=19459
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-language=en-us,en;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=connection=keep-alive
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=host=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
http://dkoesxp/djk/home/index.cfm?selectdTab=0;
CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-length=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-type=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-encoding=gzip,deflate
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=keep-alive=300
2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
protocol=HTTP/1.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteAddr=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteHost=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
requestedSessionId=3048D443AD4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverName=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverPort=80
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
servletPath=/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   isSecure=false
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
---
2004-10-28 10:59:43 StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed.
\WEB-INF\ilt\temp\upload_0001.tmp (The system cannot find the path
specified)
at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUpl

RE: File upload

2004-10-28 Thread Derrick Koes

As I mentioned in another reply, I never get to my action.  And, yes my
action mirrors the struts-upload.war example pretty closely.  Multiple
files may have been uploaded in my case, so I have to handle that.  In
the case posted, only one file was uploaded.

Derrick 



  Derrick Koes
  Senior Software Engineer
  http://www.skillsoft.com"/>
  codeauthor2001
  [EMAIL PROTECTED]
  (603) 305-1753
  
  No, try not, do
or do not, there is no try.


-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 12:04 PM
To: Tomcat Users List
Subject: Re: File upload

Are you following the struts-upload.war example that comes with the
Struts 1.1?  In that example, the uploaded file size is checked.  

If a file is stored somewhere under the
AppName/WEB-INF directory, you have to use the stream to read the file.
--- Derrick Koes <[EMAIL PROTECTED]> wrote:

> 
> Configuration:
> 
> Tomcat 5.0.24
> IIS 5.0
> JK2 connector
> Isapi_redirector2.dll
> Struts 1.1
> Commons file upload 1.0
> 
> 
> I seem to have an issue that when the file is a certain size it is 
> written to a temp file on the file system before it is parsed by the 
> multipart parser (at least that's what the exception message leads me 
> to believe).  However, since the working directory is my web app 
> (/WEB-INF/ilt), the parser can't seem to find the file (not a fully 
> qualified file name).  This is a guess, but if correct I don't know 
> how to fix the problem.
> 
> Any help is appreciated.
> 
> Belows is the stack trace and data from the request dumper valve:
> 
> 2004-10-28 10:59:32 RequestDumperValve[/ilt]:
>
===
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> REQUEST URI
> =/ilt/ilt/iltPerformUpload.do
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>authType=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]: 
> characterEncoding=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]: 
> contentLength=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> contentType=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> contextPath=/ilt
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
> dkoesxp/djk/home/index.cfm?selectdTab=0
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFMX_JSESSIONID=c8301990451098975559821
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFID=19459
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-language=en-us,en;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=connection=keep-alive
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=host=dkoesxp
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
> 4341273FB5FED42958E7C4
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
> Gecko/20041001 Firefox/0.10.1
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
> http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> CFMX_JSESSIONID=c8301990451098975559821; CFID=19459;
> CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-length=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-type=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-encoding=gzip,deflate
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=keep-alive=300
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  locale=en_US
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  method=POST
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>pathInfo=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> protocol=HTTP/1.1
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> queryString=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> remoteAddr=10.20.3.42
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> remoteHost=10.20.3.42
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  remoteUser=null
> 2004-10-28 10:59:43 R

RE: File upload

2004-10-28 Thread Derrick Koes

The stack trace shows that
struts'org.apache.struts.upload.CommonsMultipartRequestHandler.handleReq
uest(CommonsMultipartRequestHandler.java:233) invokes commons file
upload.  I honestly don't know how struts decides to do this.  I'm
assuming like any other application by examining the request header.

I also assume this happens before struts determines what action to run,
otherwise I'd be getting to my action.

Derrick



  Derrick Koes
  Senior Software Engineer
  http://www.skillsoft.com"/>
  codeauthor2001
  [EMAIL PROTECTED]
  (603) 305-1753
  
  No, try not, do
or do not, there is no try.


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 12:13 PM
To: Tomcat Users List
Subject: RE: File upload

oh i see. i guess we don't use it in this way.
org.apache.commons.fileupload.FileUploadException is being thrown before
you hit the action you say? how do you involve common fileupload direct
from the form post if you don't mind my asking?

> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 17:08
> To: Tomcat Users List
> Subject: RE: File upload
> 
> 
>  
> 
> The error occurs before execution makes it to my upload action.
> 
> -Original Message-
> From: Allistair Crossley [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 28, 2004 12:02 PM
> To: Tomcat Users List
> Subject: RE: File upload
> 
> you have the _exact_ same setup as we do here (except we are on 
> 5.0.25).
> we upload files using a multipart form and file control. then in the 
> struts action
> 
> List items = null;
> try {
>   DiskFileUpload upload = new DiskFileUpload();
>   items = upload.parseRequest(request); } catch
(FileUploadException 
> fuE) {
>   logger.error(user.getUsername() + ": error.checkin.parse; " + 
> fuE.getMessage());
>   errors.add(ActionMessages.GLOBAL_MESSAGE, 
>   new ActionMessage("error.checkin.parse"));
>   break DO_CHECKIN;
> }
> 
> FileItem primaryFile = null;
> while (iterator.hasNext()) {
>   FileItem item = (FileItem) iterator.next();
>   ...
> 
>   // capture the actual upload file
>   if (! item.isFormField()) {
>   primaryFile = item;
>   }
> }
> 
> this was out of the box tomcat/common fileupload/struts, so you must 
> have configured something somewhere?
> 
> > -Original Message-
> > From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> > Sent: 28 October 2004 16:56
> > To: Tomcat Users List
> > Subject: RE: File upload
> > 
> > 
> > 
> > Hi,
> > First question, as always: does it work on Tomcat standalone, i.e.
> > removing IIS, JK2, and the redirector out of the mix (just for now, 
> > for testing)?
> > 
> > Yoav Shapira http://www.yoavshapira.com
> >  
> > 
> > >-Original Message-
> > >From: Derrick Koes [mailto:[EMAIL PROTECTED]
> > >Sent: Thursday, October 28, 2004 11:52 AM
> > >To: Tomcat Users List
> > >Subject: File upload
> > >
> > >
> > >Configuration:
> > >
> > >Tomcat 5.0.24
> > >IIS 5.0
> > >JK2 connector
> > >Isapi_redirector2.dll
> > >Struts 1.1
> > >Commons file upload 1.0
> > >
> > >
> > >I seem to have an issue that when the file is a certain size it is 
> > >written to a temp file on the file system before it is
> parsed by the
> > >multipart parser (at least that's what the exception
> message leads me
> > to
> > >believe).  However, since the working directory is my web app 
> > >(/WEB-INF/ilt), the parser can't seem to find the file
> (not a fully
> > >qualified file name).  This is a guess, but if correct I
> > don't know how
> > >to fix the problem.
> > >
> > >Any help is appreciated.
> > >
> > >Belows is the stack trace and data from the request dumper valve:
> > >
> > >2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> > >===
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI 
> > >=/ilt/ilt/iltPerformUpload.do
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> authType=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> characterEncoding=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> > contentLength=340147
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >contentType=multipart/f

RE: File upload

2004-10-28 Thread Allistair Crossley
oh i see. i guess we don't use it in this way. 
org.apache.commons.fileupload.FileUploadException is being thrown before you hit the 
action you say? how do you involve common fileupload direct from the form post if you 
don't mind my asking?

> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 17:08
> To: Tomcat Users List
> Subject: RE: File upload
> 
> 
>  
> 
> The error occurs before execution makes it to my upload action.
> 
> -Original Message-
> From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 28, 2004 12:02 PM
> To: Tomcat Users List
> Subject: RE: File upload
> 
> you have the _exact_ same setup as we do here (except we are 
> on 5.0.25).
> we upload files using a multipart form and file control. then in the
> struts action
> 
> List items = null;
> try {
>   DiskFileUpload upload = new DiskFileUpload();
>   items = upload.parseRequest(request);
> } catch (FileUploadException fuE) {
>   logger.error(user.getUsername() + ": error.checkin.parse; " +
> fuE.getMessage());
>   errors.add(ActionMessages.GLOBAL_MESSAGE, 
>   new ActionMessage("error.checkin.parse"));
>   break DO_CHECKIN;
> }
> 
> FileItem primaryFile = null;
> while (iterator.hasNext()) {
>   FileItem item = (FileItem) iterator.next();
>   ...
> 
>   // capture the actual upload file
>   if (! item.isFormField()) {
>   primaryFile = item;
>   }
> }
> 
> this was out of the box tomcat/common fileupload/struts, so you must
> have configured something somewhere?
> 
> > -Original Message-
> > From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> > Sent: 28 October 2004 16:56
> > To: Tomcat Users List
> > Subject: RE: File upload
> > 
> > 
> > 
> > Hi,
> > First question, as always: does it work on Tomcat standalone, i.e.
> > removing IIS, JK2, and the redirector out of the mix (just for now, 
> > for testing)?
> > 
> > Yoav Shapira http://www.yoavshapira.com
> >  
> > 
> > >-Original Message-
> > >From: Derrick Koes [mailto:[EMAIL PROTECTED]
> > >Sent: Thursday, October 28, 2004 11:52 AM
> > >To: Tomcat Users List
> > >Subject: File upload
> > >
> > >
> > >Configuration:
> > >
> > >Tomcat 5.0.24
> > >IIS 5.0
> > >JK2 connector
> > >Isapi_redirector2.dll
> > >Struts 1.1
> > >Commons file upload 1.0
> > >
> > >
> > >I seem to have an issue that when the file is a certain size it is 
> > >written to a temp file on the file system before it is 
> parsed by the 
> > >multipart parser (at least that's what the exception 
> message leads me
> > to
> > >believe).  However, since the working directory is my web app 
> > >(/WEB-INF/ilt), the parser can't seem to find the file 
> (not a fully 
> > >qualified file name).  This is a guess, but if correct I
> > don't know how
> > >to fix the problem.
> > >
> > >Any help is appreciated.
> > >
> > >Belows is the stack trace and data from the request dumper valve:
> > >
> > >2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> > >===
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI 
> > >=/ilt/ilt/iltPerformUpload.do
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> authType=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> characterEncoding=null
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> > contentLength=340147
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >contentType=multipart/form-data;
> > >boundary=---41184676334
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> contextPath=/ilt
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillP
> > ort=http:/
> > /
> > >dkoesxp/djk/home/index.cfm?selectdTab=0
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFMX_JSESSIONID=c8301990451098975559821
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFID=19459
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> > >cookie=CFTOKEN=98634115
> > >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> &

RE: File upload

2004-10-28 Thread Derrick Koes
 

The error occurs before execution makes it to my upload action.

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 12:02 PM
To: Tomcat Users List
Subject: RE: File upload

you have the _exact_ same setup as we do here (except we are on 5.0.25).
we upload files using a multipart form and file control. then in the
struts action

List items = null;
try {
DiskFileUpload upload = new DiskFileUpload();
items = upload.parseRequest(request);
} catch (FileUploadException fuE) {
logger.error(user.getUsername() + ": error.checkin.parse; " +
fuE.getMessage());
errors.add(ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage("error.checkin.parse"));
break DO_CHECKIN;
}

FileItem primaryFile = null;
while (iterator.hasNext()) {
FileItem item = (FileItem) iterator.next();
  ...

// capture the actual upload file
  if (! item.isFormField()) {
primaryFile = item;
}
}

this was out of the box tomcat/common fileupload/struts, so you must
have configured something somewhere?

> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 16:56
> To: Tomcat Users List
> Subject: RE: File upload
> 
> 
> 
> Hi,
> First question, as always: does it work on Tomcat standalone, i.e.
> removing IIS, JK2, and the redirector out of the mix (just for now, 
> for testing)?
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> 
> >-Original Message-
> >From: Derrick Koes [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, October 28, 2004 11:52 AM
> >To: Tomcat Users List
> >Subject: File upload
> >
> >
> >Configuration:
> >
> >Tomcat 5.0.24
> >IIS 5.0
> >JK2 connector
> >Isapi_redirector2.dll
> >Struts 1.1
> >Commons file upload 1.0
> >
> >
> >I seem to have an issue that when the file is a certain size it is 
> >written to a temp file on the file system before it is parsed by the 
> >multipart parser (at least that's what the exception message leads me
> to
> >believe).  However, since the working directory is my web app 
> >(/WEB-INF/ilt), the parser can't seem to find the file (not a fully 
> >qualified file name).  This is a guess, but if correct I
> don't know how
> >to fix the problem.
> >
> >Any help is appreciated.
> >
> >Belows is the stack trace and data from the request dumper valve:
> >
> >2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> >===
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI 
> >=/ilt/ilt/iltPerformUpload.do
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> contentLength=340147
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >contentType=multipart/form-data;
> >boundary=---41184676334
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillP
> ort=http:/
> /
> >dkoesxp/djk/home/index.cfm?selectdTab=0
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFMX_JSESSIONID=c8301990451098975559821
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFID=19459
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFTOKEN=98634115
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=accept=text/xml,application/xml,application/xhtml+xml,
> text/html;
> q
> >=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=accept-language=en-us,en;q=0.5
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=connection=keep-alive
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=host=dkoesxp
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid
> =3048D443A
> D
> >4341273FB5FED42958E7C4
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
> >Gecko/20041001 Firefox/0.10.1
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnT
> oSkillPort
> =
> >http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> >CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
> >2004-

Re: File upload

2004-10-28 Thread Caroline Jen
Are you following the struts-upload.war example that
comes with the Struts 1.1?  In that example, the
uploaded file size is checked.  

If a file is stored somewhere under the
AppName/WEB-INF directory, you have to use the stream
to read the file.
--- Derrick Koes <[EMAIL PROTECTED]> wrote:

> 
> Configuration:
> 
> Tomcat 5.0.24
> IIS 5.0
> JK2 connector
> Isapi_redirector2.dll
> Struts 1.1
> Commons file upload 1.0
> 
> 
> I seem to have an issue that when the file is a
> certain size it is
> written to a temp file on the file system before it
> is parsed by the
> multipart parser (at least that's what the exception
> message leads me to
> believe).  However, since the working directory is
> my web app
> (/WEB-INF/ilt), the parser can't seem to find the
> file (not a fully
> qualified file name).  This is a guess, but if
> correct I don't know how
> to fix the problem.
> 
> Any help is appreciated.
> 
> Belows is the stack trace and data from the request
> dumper valve:
> 
> 2004-10-28 10:59:32 RequestDumperValve[/ilt]:
>
===
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> REQUEST URI
> =/ilt/ilt/iltPerformUpload.do
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>authType=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]: 
> characterEncoding=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]: 
> contentLength=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> contentType=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> contextPath=/ilt
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
> dkoesxp/djk/home/index.cfm?selectdTab=0
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFMX_JSESSIONID=c8301990451098975559821
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFID=19459
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> cookie=CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
> =0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-language=en-us,en;q=0.5
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=connection=keep-alive
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=host=dkoesxp
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
> 4341273FB5FED42958E7C4
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=user-agent=Mozilla/5.0 (Windows; U; Windows
> NT 5.1; rv:1.7.3)
> Gecko/20041001 Firefox/0.10.1
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
> http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> CFMX_JSESSIONID=c8301990451098975559821; CFID=19459;
> CFTOKEN=98634115
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-length=340147
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=content-type=multipart/form-data;
> boundary=---41184676334
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-encoding=gzip,deflate
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> header=keep-alive=300
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  locale=en_US
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  method=POST
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>pathInfo=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> protocol=HTTP/1.1
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
> queryString=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> remoteAddr=10.20.3.42
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> remoteHost=10.20.3.42
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  remoteUser=null
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> requestedSessionId=3048D443AD4341273FB5FED42958E7C4
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  scheme=http
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  serverName=dkoesxp
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>  serverPort=80
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> servletPath=/ilt/iltPerformUpload.do
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:   
>isSecure=false
> 2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>
---
> 2004-10-28 10:59:43 StandardWrapperValve[action]:
> Servlet.service() for
> servlet action threw exception
> org.apache.commons.fileupload.FileUploadException:
> Processing of
> multipart/form-data request failed.
> \WEB-INF\ilt\temp\upload_0001.tmp (The system
> cannot find the path
> specified)
>   at
>
org.apache.commons.fileupload.Fi

RE: File upload

2004-10-28 Thread Allistair Crossley
you have the _exact_ same setup as we do here (except we are on 5.0.25). we upload 
files using a multipart form and file control. then in the struts action

List items = null;
try {
DiskFileUpload upload = new DiskFileUpload();
items = upload.parseRequest(request);
} catch (FileUploadException fuE) {
logger.error(user.getUsername() + ": error.checkin.parse; " +   
fuE.getMessage());
errors.add(ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage("error.checkin.parse"));
break DO_CHECKIN;
}

FileItem primaryFile = null;
while (iterator.hasNext()) {
FileItem item = (FileItem) iterator.next();
  ...

// capture the actual upload file
  if (! item.isFormField()) {
primaryFile = item;
}
}

this was out of the box tomcat/common fileupload/struts, so you must have configured 
something somewhere?

> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> Sent: 28 October 2004 16:56
> To: Tomcat Users List
> Subject: RE: File upload
> 
> 
> 
> Hi,
> First question, as always: does it work on Tomcat standalone, i.e.
> removing IIS, JK2, and the redirector out of the mix (just 
> for now, for
> testing)?
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> 
> >-Original Message-
> >From: Derrick Koes [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, October 28, 2004 11:52 AM
> >To: Tomcat Users List
> >Subject: File upload
> >
> >
> >Configuration:
> >
> >Tomcat 5.0.24
> >IIS 5.0
> >JK2 connector
> >Isapi_redirector2.dll
> >Struts 1.1
> >Commons file upload 1.0
> >
> >
> >I seem to have an issue that when the file is a certain size it is
> >written to a temp file on the file system before it is parsed by the
> >multipart parser (at least that's what the exception message leads me
> to
> >believe).  However, since the working directory is my web app
> >(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
> >qualified file name).  This is a guess, but if correct I 
> don't know how
> >to fix the problem.
> >
> >Any help is appreciated.
> >
> >Belows is the stack trace and data from the request dumper valve:
> >
> >2004-10-28 10:59:32 RequestDumperValve[/ilt]:
> >===
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
> >=/ilt/ilt/iltPerformUpload.do
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:  
> contentLength=340147
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >contentType=multipart/form-data;
> >boundary=---41184676334
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillP
> ort=http:/
> /
> >dkoesxp/djk/home/index.cfm?selectdTab=0
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFMX_JSESSIONID=c8301990451098975559821
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFID=19459
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >cookie=CFTOKEN=98634115
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=accept=text/xml,application/xml,application/xhtml+xml,
> text/html;
> q
> >=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=accept-language=en-us,en;q=0.5
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=connection=keep-alive
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=host=dkoesxp
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid
> =3048D443A
> D
> >4341273FB5FED42958E7C4
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
> >Gecko/20041001 Firefox/0.10.1
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnT
> oSkillPort
> =
> >http://dkoesxp/djk/home/index.cfm?selectdTab=0;
> >CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=content-length=340147
> >2004-10-28 10:59:43 RequestDumperValve[/ilt]:
> >header=content-type=multipart/form-data;
> >boundary=--

RE: File upload

2004-10-28 Thread Shapira, Yoav

Hi,
First question, as always: does it work on Tomcat standalone, i.e.
removing IIS, JK2, and the redirector out of the mix (just for now, for
testing)?

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Derrick Koes [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 28, 2004 11:52 AM
>To: Tomcat Users List
>Subject: File upload
>
>
>Configuration:
>
>Tomcat 5.0.24
>IIS 5.0
>JK2 connector
>Isapi_redirector2.dll
>Struts 1.1
>Commons file upload 1.0
>
>
>I seem to have an issue that when the file is a certain size it is
>written to a temp file on the file system before it is parsed by the
>multipart parser (at least that's what the exception message leads me
to
>believe).  However, since the working directory is my web app
>(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
>qualified file name).  This is a guess, but if correct I don't know how
>to fix the problem.
>
>Any help is appreciated.
>
>Belows is the stack trace and data from the request dumper valve:
>
>2004-10-28 10:59:32 RequestDumperValve[/ilt]:
>===
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
>=/ilt/ilt/iltPerformUpload.do
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>contentType=multipart/form-data;
>boundary=---41184676334
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http:/
/
>dkoesxp/djk/home/index.cfm?selectdTab=0
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFMX_JSESSIONID=c8301990451098975559821
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFID=19459
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>cookie=CFTOKEN=98634115
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept=text/xml,application/xml,application/xhtml+xml,text/html;
q
>=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-language=en-us,en;q=0.5
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=connection=keep-alive
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=host=dkoesxp
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443A
D
>4341273FB5FED42958E7C4
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
>Gecko/20041001 Firefox/0.10.1
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort
=
>http://dkoesxp/djk/home/index.cfm?selectdTab=0;
>CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=content-length=340147
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=content-type=multipart/form-data;
>boundary=---41184676334
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-encoding=gzip,deflate
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>header=keep-alive=300
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>protocol=HTTP/1.1
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>remoteAddr=10.20.3.42
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>remoteHost=10.20.3.42
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>requestedSessionId=3048D443AD4341273FB5FED42958E7C4
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
serverName=dkoesxp
>2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverPort=80
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>servletPath=/ilt/iltPerformUpload.do
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:   isSecure=false
>2004-10-28 10:59:43 RequestDumperValve[/ilt]:
>---
>2004-10-28 10:59:43 StandardWrapperValve[action]: Servlet.service() for
>servlet action threw exception
>org.apache.commons.fileupload.FileUploadException: Processing of
>multipart/form-data request failed.
>\WEB-INF\ilt\temp\upload_0001.tmp (The system cannot find the path
>specified)
>   at
>org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBas
e
>.java:429)
>   at
>org.apache.struts.uploa

RE: File upload from main program

2004-10-05 Thread Pawson, David
 

-Original Message-
From: Sng Wee Jim

Is there any free API around that allows uploading of files 
to the server (tomcat or weblogic) via a servlet from a 
main application program? (instead of from a web browser)


Anything from the jakarta fileupload project that can be 
reused here?
http://jakarta.apache.org/commons/fileupload/
I use that (commons-fileupload); No problems, though I wanted multiple file selection,
for which I had to write some javascript.


HTH DaveP.

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File Upload with JSPs

2004-05-26 Thread None None
As someone who wrote their own multipart parser, then used the famous 
O'Reilly parser, and finally discovered the commons fileupload package, let 
me just say this... using anything but that last one is NUTS! :)  Seriously 
though, the various commons projects have been a Godsend ever since I found 
out about them, fileupload among them.


From: Deepak Vishwanathan <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: RE: File Upload with JSPs
Date: Wed, 26 May 2004 14:36:00 -0700 (PDT)
Hi,
I would like to thank Trung Nguyen and Simone for their timely response.
Thank you
Deepak Vishwanathan
Trung Nguyen <[EMAIL PROTECTED]> wrote:
Deepak,
It works great with my apps...
http://jakarta.apache.org/commons/fileupload/
-Original Message-
From: Deepak Vishwanathan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 5:17 PM
To: [EMAIL PROTECTED]
Subject: File Upload with JSPs
Hi,
I am working with Jsps on Tomcat Container. I searched through the net and
found a class called MimeParser which seems to provide the file upload
capability. Is there some open source Java API thats available that can be
freely redistributed and that would provide me with the file uploading
capability. Or does such a package exist in the Tomcat Jakarta site.
Thanks
Deepak

-
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger
_
Best Restaurant Giveaway Ever! Vote for your favorites for a chance to win 
$1 million! http://local.msn.com/special/giveaway.asp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: File Upload with JSPs

2004-05-26 Thread Deepak Vishwanathan
Hi,
 
I would like to thank Trung Nguyen and Simone for their timely response.
 
Thank you 
Deepak Vishwanathan

Trung Nguyen <[EMAIL PROTECTED]> wrote:
Deepak,

It works great with my apps...
http://jakarta.apache.org/commons/fileupload/


-Original Message-
From: Deepak Vishwanathan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 5:17 PM
To: [EMAIL PROTECTED]
Subject: File Upload with JSPs


Hi,

I am working with Jsps on Tomcat Container. I searched through the net and
found a class called MimeParser which seems to provide the file upload
capability. Is there some open source Java API thats available that can be
freely redistributed and that would provide me with the file uploading
capability. Or does such a package exist in the Tomcat Jakarta site.

Thanks
Deepak




-
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

RE: File Upload with JSPs

2004-05-26 Thread Trung Nguyen
Deepak,

It works great with my apps...
http://jakarta.apache.org/commons/fileupload/


-Original Message-
From: Deepak Vishwanathan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 5:17 PM
To: [EMAIL PROTECTED]
Subject: File Upload with JSPs


Hi,
 
I am working with Jsps on Tomcat Container. I searched through the net and
found a class called MimeParser which seems to provide the file upload
capability. Is there some open source Java API thats available that can be
freely redistributed and that would provide me with the file uploading
capability. Or does such a package exist in the Tomcat Jakarta site.
 
Thanks
Deepak
 
 


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload Bug?

2003-09-03 Thread Allen Hadden

I had this (or a similar problem) a long time ago.  It only occurred when connecting 
to IIS via HTTPS (SSL).  Also, my problem was with isapi_redirector.dll, not 
isapi_redirector2.dll.  It might be the same issue, though.

It was some sort of timing problem with the ISAPI redirector.  I hacked around the 
problem in the redirector by reading large POST requests to a temporary file before 
sending them to Tomcat.  This "fixed" the problem.  At the time, I attributed it to 
some IIS quirk.

Note that what I learned didn't point me to the O'Reilly upload code at all.

If you're interested, I can share the code.  Again, the modifications were to the 
previous version of the redirector.

Allen

> -Original Message-
> From: Tom Lyle [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 03, 2003 11:11 AM
> To: Tomcat Users List
> Subject: RE: File upload Bug?
> 
> 
> I've just realised something. The machine thats running 
> Tomcat 4.1.27 is
> serving the pages with IIS and isapi_redirector2.dll, when i connect
> directly to Tomcat via port 8080 it works fine.
> 
> Right, i've just searched the archives and found 2 people 
> posting (much more
> elequently) the same problem but no solution. Does anyone 
> know how to fix
> this?
> 
> thanks
> 
> Tom
> 
> > -Original Message-
> > From: Tom Lyle [mailto:[EMAIL PROTECTED]
> > Sent: 03 September 2003 15:53
> > To: Tomcat Users List
> > Subject: File upload Bug?
> >
> >
> > Hi All,
> >
> > I'm using the o'reilly mutipart request classes to upload 
> files using a
> > servlet and its happily working using Tomcat 4.1.18. However,
> > i've upgraded
> > to the tomcat 4.1.27 and a certain file (just a jpg) causes 
> the upload to
> > fail with an java.io.IOException: unexpected end of part. 
> Now i can upload
> > this file to the webapp running on Tomcat 4.1.18 but not to the
> > same webapp
> > running on 4.1.27. What gives?
> >
> > Running on Windows 2000
> > with sun jdk1.4.1
> >
> > Tom
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File upload Bug?

2003-09-03 Thread Remy Maucherat
Tom Lyle wrote:

I've just realised something. The machine thats running Tomcat 4.1.27 is
serving the pages with IIS and isapi_redirector2.dll, when i connect
directly to Tomcat via port 8080 it works fine.
Right, i've just searched the archives and found 2 people posting (much more
elequently) the same problem but no solution. Does anyone know how to fix
this?
A BZ entry on this problem already exists:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21616
--
x
Rémy Maucherat
Senior Developer & Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: File upload Bug?

2003-09-03 Thread Tom Lyle
im on Windows 2000 server. It seems to be a bug in isapi_redirect2.dll. Any
thoughts anyone?

> -Original Message-
> From: Andy Eastham [mailto:[EMAIL PROTECTED]
> Sent: 03 September 2003 16:23
> To: Tomcat Users List
> Subject: RE: File upload Bug?
>
>
> Tom,
>
> I found that the O'Reilly classes were totally unreliable on Solaris with
> binary uploads and mod_webapp.
>
> However, I They work fine on windows and Linux, and luckily I've
> not needed
> them on a Solaris deployment.
>
> I think decided it was actually caused by a bug in Solaris
> mod_webapp - are
> you using this?
>
> Andy
>
> > -Original Message-
> > From: Tom Lyle [mailto:[EMAIL PROTECTED]
> > Sent: 03 September 2003 15:53
> > To: Tomcat Users List
> > Subject: File upload Bug?
> >
> >
> > Hi All,
> >
> > I'm using the o'reilly mutipart request classes to upload files using a
> > servlet and its happily working using Tomcat 4.1.18. However,
> > i've upgraded
> > to the tomcat 4.1.27 and a certain file (just a jpg) causes the
> upload to
> > fail with an java.io.IOException: unexpected end of part. Now i
> can upload
> > this file to the webapp running on Tomcat 4.1.18 but not to the
> > same webapp
> > running on 4.1.27. What gives?
> >
> > Running on Windows 2000
> > with sun jdk1.4.1
> >
> > Tom
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload Bug?

2003-09-03 Thread Andy Eastham
Tom,

I found that the O'Reilly classes were totally unreliable on Solaris with
binary uploads and mod_webapp.

However, I They work fine on windows and Linux, and luckily I've not needed
them on a Solaris deployment.

I think decided it was actually caused by a bug in Solaris mod_webapp - are
you using this?

Andy

> -Original Message-
> From: Tom Lyle [mailto:[EMAIL PROTECTED]
> Sent: 03 September 2003 15:53
> To: Tomcat Users List
> Subject: File upload Bug?
>
>
> Hi All,
>
> I'm using the o'reilly mutipart request classes to upload files using a
> servlet and its happily working using Tomcat 4.1.18. However,
> i've upgraded
> to the tomcat 4.1.27 and a certain file (just a jpg) causes the upload to
> fail with an java.io.IOException: unexpected end of part. Now i can upload
> this file to the webapp running on Tomcat 4.1.18 but not to the
> same webapp
> running on 4.1.27. What gives?
>
> Running on Windows 2000
> with sun jdk1.4.1
>
> Tom
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File upload Bug?

2003-09-03 Thread Tom Lyle
I've just realised something. The machine thats running Tomcat 4.1.27 is
serving the pages with IIS and isapi_redirector2.dll, when i connect
directly to Tomcat via port 8080 it works fine.

Right, i've just searched the archives and found 2 people posting (much more
elequently) the same problem but no solution. Does anyone know how to fix
this?

thanks

Tom

> -Original Message-
> From: Tom Lyle [mailto:[EMAIL PROTECTED]
> Sent: 03 September 2003 15:53
> To: Tomcat Users List
> Subject: File upload Bug?
>
>
> Hi All,
>
> I'm using the o'reilly mutipart request classes to upload files using a
> servlet and its happily working using Tomcat 4.1.18. However,
> i've upgraded
> to the tomcat 4.1.27 and a certain file (just a jpg) causes the upload to
> fail with an java.io.IOException: unexpected end of part. Now i can upload
> this file to the webapp running on Tomcat 4.1.18 but not to the
> same webapp
> running on 4.1.27. What gives?
>
> Running on Windows 2000
> with sun jdk1.4.1
>
> Tom
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [File Upload]Multiple Destination ??

2003-08-30 Thread Bill Barker
Another alternative (depending on your network config, and network policies)
is to upload the file once and rsync the uploaded file to the various
locations.

"Tim Funk" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The client (SWING app) will need to perform multiple HTTP requests to post
> the file to the multiple servers. Thats the way HTTP works. You can do
this
> concurrently with multiple threads. (How-to is beyond the scope of this
list
> and an exercise in using google)
>
> Otherwise, you can have one server act as master and copy the file to the
> other locations but this may bypass some of your business logic.
>
> -Tim
>
> Bikash Paul wrote:
>
> > Hi all friends,
> >
> > Iam facing problem with Uploading of one file in
> > multiple destination means user can select multiple
> > remote destination from client interface(swing) and my
> > application should send that file in all remote
> > destination from local hot folder.For that I have used
> > Jlist Box with Multiple selection mode in swing client
> > interface.Presently my application is working fine
> > with one destination and multiple file.Iam little bit
> > confused about the way of proceed Can any one plz
> > guide me how I should proceed, I want only logic or
> > some suggestion.Iam using Tomcat4.1.24 and servlet.
> >
> > Thanks & Regards
> > Bikash
> >




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [File Upload]Multiple Destination ??

2003-08-29 Thread Tim Funk
The client (SWING app) will need to perform multiple HTTP requests to post 
the file to the multiple servers. Thats the way HTTP works. You can do this 
concurrently with multiple threads. (How-to is beyond the scope of this list 
and an exercise in using google)

Otherwise, you can have one server act as master and copy the file to the 
other locations but this may bypass some of your business logic.

-Tim

Bikash Paul wrote:

Hi all friends,

Iam facing problem with Uploading of one file in
multiple destination means user can select multiple
remote destination from client interface(swing) and my
application should send that file in all remote
destination from local hot folder.For that I have used
Jlist Box with Multiple selection mode in swing client
interface.Presently my application is working fine
with one destination and multiple file.Iam little bit
confused about the way of proceed Can any one plz
guide me how I should proceed, I want only logic or
some suggestion.Iam using Tomcat4.1.24 and servlet.
Thanks & Regards
Bikash


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Bikash Paul
Hi Gang,

Lot of thanks for all of urs suggestion.Now By
modifying some factors in my code like by compressing
file on the fly using util.zip package and using
Buffer stream and also increasing block size(16384
bytes) I can increase speed of file transfer upto some
extent means now speed of manual copy and my
application's file transfer speed both are same.Any
way Lot of thanks.

Thanks
Bikash
--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> 
> Howdy,
> You will be hard-pressed to find any network file
> transmission
> mechanism, even on unlimited bandwidth, that exceeds
> local hard-drive
> folder to folder copy.  Good luck ;)
> 
> >transfer.Networking is done through 2MBPS dedicated
> >ISDN lease line.Any help will be highly
> appreciated.
> 
> Verify you really have 2mbps bandwidth.
> 
> >1.Iam sending file to server as block wise of 1024
> >bytes and my servlet also writes file in remote
> >destination folder as a block wise of 1024 bytes.If
> I
> >increase the block size then is it increase the
> speed
> >?
> 
> Up to a certain block size, which is the MTU for the
> link with the
> lowest MTU along your transmission path, yes.
> 
> >2. I have used DataOutputStream for writing on
> >outputstream and InputStream for reading,if I used
> >BufferWriter and BufferReader then is it increase
> the
> >speed ?
> 
> Actually it might decrease it.  Give it a shot
> though ;)
> 
> >3.Is there any tuning of tomcat,so that it increase
> >the speed ?
> 
> Not really: I don't think tomcat would be your
> bottleneck.  You could
> try to implement a raw socket connector and use it
> instead of coyote,
> but I doubt you'd see much performance difference.
> 
> >4.Lastly I have closed all my Input and output
> stream
> >object and I have also closed all connection at the
> >end of file transfer method.
> 
> That's a good practice that doesn't have much to do
> with transmission
> speed.
> 
> >Or is there any other factor for increasing Speed ?
> 
> Compress your file better?
> 
> Yoav Shapira
> 
> 
> 
> This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Luciano Kiniti Issoe
1) Yes
2) Yes
3) No (AFAIK)
4) OK
5) Split your file and use threads in you application.

- Original Message - 
From: "Micael" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, August 19, 2003 2:59 PM
Subject: Re: [File Upload] How to Increase the Speed of File transfer ??


> You definitely should use a buffered stream.  Get a book on networking and
> take a look at these issues.  There are many good ones out there.  Network
> Programming by Hughes, et al, is one I have enjoyed.
>
> Micael
>
> At 01:50 AM 8/19/2003 -0700, Bikash Paul wrote:
> >Hi gang,
> >
> >I have developed one file transfer(means file
> >uploading) application for that I have used
> >swing,servlet and Tomcat4.1.24.Now my problem is the
> >speed. The speed of manual copy and paste of file on
> >hard disk of remote computer is faster than my
> >application.I want to increase the speed of file
> >transfer.Networking is done through 2MBPS dedicated
> >ISDN lease line.Any help will be highly appreciated.
> >
> >I want some suggestion about below factors:
> >
> >1.Iam sending file to server as block wise of 1024
> >bytes and my servlet also writes file in remote
> >destination folder as a block wise of 1024 bytes.If I
> >increase the block size then is it increase the speed
> >?
> >
> >2. I have used DataOutputStream for writing on
> >outputstream and InputStream for reading,if I used
> >BufferWriter and BufferReader then is it increase the
> >speed ?
> >
> >3.Is there any tuning of tomcat,so that it increase
> >the speed ?
> >
> >4.Lastly I have closed all my Input and output stream
> >object and I have also closed all connection at the
> >end of file transfer method.
> >
> >Or is there any other factor for increasing Speed ?
> >
> >Thanks & Regards
> >Bikash
> >
> >
> >
> >__
> >Do you Yahoo!?
> >Yahoo! SiteBuilder - Free, easy-to-use web site design software
> >http://sitebuilder.yahoo.com
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> LEGAL NOTICE
>
> This electronic mail  transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged.  This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited.  If you
> have received this transmission in error, please delete the message.
Thank
> you
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Justin Ruthenbeck
If speed really is of paramount importance, consider directly opening 
sockets and transfering data directly between code running on Tomcat and 
your client application/applet/etc -- essentially taking Tomcat out of the 
loop for the actual file transfer.

We've seen significant performance increases by doing this (though our 
messages are short enough that the http/Tomcat overhead is 
significant).  Think long and hard before doing this as you'll give up most 
of the benefits you get from Tomcat in the first place.  It's an option, 
though.

justin

At 05:06 AM 8/19/2003, you wrote:

OK, take a step back and think about this.

ATA-66 disk bus: 533 Mbps
ATA-100 disk bus: 800 Mbps
Ultra-160 SCSI disk bus: 1300 Mbps
Now, you're saying that you have a network connection of 2 Mbps (I think 
you mean T1 or E1 as ISDN is not > 128 Kbps unless you have a bunch of 
lines bonded together but that's not important).  There's no way to change 
Tomcat to make 2 Mbps be equal to 533 Mbps or even 20 Mbps.

A basic 200 MHz Pentium class server with even rudimentary disks can 
easily saturate a 10 Mbps LAN connection. Unless your server was built 
prior to 1997 or so, my guess is your network connection can never match 
your server's internal bus "speed".

I think your solution is to stop writing blocks to disk as soon as you 
receive them, and instead assemble your file in a buffer, then write it 
out to disk all at once.  Or switch to a dedicated GIGAbit line, which 
with overhead would get you around ATA-100 speed.

John

Bikash Paul wrote:

Hi gang,
I have developed one file transfer(means file
uploading) application for that I have used
swing,servlet and Tomcat4.1.24.Now my problem is the
speed. The speed of manual copy and paste of file on
hard disk of remote computer is faster than my
application.I want to increase the speed of file
transfer.Networking is done through 2MBPS dedicated
ISDN lease line.Any help will be highly appreciated.
I want some suggestion about below factors:
1.Iam sending file to server as block wise of 1024
bytes and my servlet also writes file in remote
destination folder as a block wise of 1024 bytes.If I
increase the block size then is it increase the speed
?
2. I have used DataOutputStream for writing on
outputstream and InputStream for reading,if I used
BufferWriter and BufferReader then is it increase the
speed ?
3.Is there any tuning of tomcat,so that it increase
the speed ?
4.Lastly I have closed all my Input and output stream
object and I have also closed all connection at the
end of file transfer method.
Or is there any other factor for increasing Speed ?
Thanks & Regards
Bikash
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Micael
You definitely should use a buffered stream.  Get a book on networking and 
take a look at these issues.  There are many good ones out there.  Network 
Programming by Hughes, et al, is one I have enjoyed.

Micael

At 01:50 AM 8/19/2003 -0700, Bikash Paul wrote:
Hi gang,

I have developed one file transfer(means file
uploading) application for that I have used
swing,servlet and Tomcat4.1.24.Now my problem is the
speed. The speed of manual copy and paste of file on
hard disk of remote computer is faster than my
application.I want to increase the speed of file
transfer.Networking is done through 2MBPS dedicated
ISDN lease line.Any help will be highly appreciated.
I want some suggestion about below factors:

1.Iam sending file to server as block wise of 1024
bytes and my servlet also writes file in remote
destination folder as a block wise of 1024 bytes.If I
increase the block size then is it increase the speed
?
2. I have used DataOutputStream for writing on
outputstream and InputStream for reading,if I used
BufferWriter and BufferReader then is it increase the
speed ?
3.Is there any tuning of tomcat,so that it increase
the speed ?
4.Lastly I have closed all my Input and output stream
object and I have also closed all connection at the
end of file transfer method.
Or is there any other factor for increasing Speed ?

Thanks & Regards
Bikash


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Pablo Mayrgundter

> I want some suggestion about below factors:
>
> 1.Iam sending file to server as block wise of 1024
> bytes and my servlet also writes file in remote
> destination folder as a block wise of 1024 bytes.If I
> increase the block size then is it increase the speed
> ?

Yeah.. test with higher block sizes.

> 2. I have used DataOutputStream for writing on
> outputstream and InputStream for reading,if I used
> BufferWriter and BufferReader then is it increase the
> speed ?

Defnitely a good idea.

-- 
Pablo Mayrgundter
Director of Applications and Services
www.reeltwo.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread Shapira, Yoav

Howdy,
You will be hard-pressed to find any network file transmission
mechanism, even on unlimited bandwidth, that exceeds local hard-drive
folder to folder copy.  Good luck ;)

>transfer.Networking is done through 2MBPS dedicated
>ISDN lease line.Any help will be highly appreciated.

Verify you really have 2mbps bandwidth.

>1.Iam sending file to server as block wise of 1024
>bytes and my servlet also writes file in remote
>destination folder as a block wise of 1024 bytes.If I
>increase the block size then is it increase the speed
>?

Up to a certain block size, which is the MTU for the link with the
lowest MTU along your transmission path, yes.

>2. I have used DataOutputStream for writing on
>outputstream and InputStream for reading,if I used
>BufferWriter and BufferReader then is it increase the
>speed ?

Actually it might decrease it.  Give it a shot though ;)

>3.Is there any tuning of tomcat,so that it increase
>the speed ?

Not really: I don't think tomcat would be your bottleneck.  You could
try to implement a raw socket connector and use it instead of coyote,
but I doubt you'd see much performance difference.

>4.Lastly I have closed all my Input and output stream
>object and I have also closed all connection at the
>end of file transfer method.

That's a good practice that doesn't have much to do with transmission
speed.

>Or is there any other factor for increasing Speed ?

Compress your file better?

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [File Upload] How to Increase the Speed of File transfer ??

2003-08-19 Thread John Turner
OK, take a step back and think about this.

ATA-66 disk bus: 533 Mbps
ATA-100 disk bus: 800 Mbps
Ultra-160 SCSI disk bus: 1300 Mbps
Now, you're saying that you have a network connection of 2 Mbps (I think 
you mean T1 or E1 as ISDN is not > 128 Kbps unless you have a bunch of 
lines bonded together but that's not important).  There's no way to 
change Tomcat to make 2 Mbps be equal to 533 Mbps or even 20 Mbps.

A basic 200 MHz Pentium class server with even rudimentary disks can 
easily saturate a 10 Mbps LAN connection. Unless your server was built 
prior to 1997 or so, my guess is your network connection can never match 
your server's internal bus "speed".

I think your solution is to stop writing blocks to disk as soon as you 
receive them, and instead assemble your file in a buffer, then write it 
out to disk all at once.  Or switch to a dedicated GIGAbit line, which 
with overhead would get you around ATA-100 speed.

John

Bikash Paul wrote:

Hi gang,

I have developed one file transfer(means file
uploading) application for that I have used
swing,servlet and Tomcat4.1.24.Now my problem is the
speed. The speed of manual copy and paste of file on
hard disk of remote computer is faster than my
application.I want to increase the speed of file
transfer.Networking is done through 2MBPS dedicated
ISDN lease line.Any help will be highly appreciated.
I want some suggestion about below factors:

1.Iam sending file to server as block wise of 1024
bytes and my servlet also writes file in remote
destination folder as a block wise of 1024 bytes.If I
increase the block size then is it increase the speed
?
2. I have used DataOutputStream for writing on
outputstream and InputStream for reading,if I used
BufferWriter and BufferReader then is it increase the
speed ?
3.Is there any tuning of tomcat,so that it increase
the speed ?
4.Lastly I have closed all my Input and output stream
object and I have also closed all connection at the
end of file transfer method.
Or is there any other factor for increasing Speed ?

Thanks & Regards
Bikash


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: File Upload in JSP

2003-04-06 Thread Reynir Hübner
Check out the jakarta-commons libraries, you should be able to find file-upload 
component there.
http://jakarta.apache.org/commons/fileupload/index.html
Hope it helps
-reynir


> -Original Message-
> From: there over [mailto:[EMAIL PROTECTED] 
> Sent: 6. apríl 2003 10:53
> To: [EMAIL PROTECTED]
> Subject: File Upload in JSP
> 
> 
> 
> Hi All :)
> 
> I want to have 'File Uploading'  feature in my web 
> application.How can i do this in JSP?
> 
> Thnx All :)
> 
> 
> 
> -
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-07 Thread Sean Dockery
Hmmm...  I'm not sure that catalina can write to /tmp just because your
users can.  Try running this code before calling MultipartRequest multi =
...

FileWriter fw = new FileWriter("/tmp/hello.txt"); // (line 1)
fw.write("Hello World\n");
fw.close();

When you start Tomcat, what value does it say it is using for
$CATALINA_TEMP?  Try using that directory (instead of /tmp) for your file
upload.

Also, defaultFileRenamePolicy was initialized to be new
DefaultFileRenamePolicy(), right?
--
Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com

"Patrick L Archibald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've tried JVM 1.2 and 1.3. The public (meaning valid users) have all
> authority to the "/tmp" directory. This direcoty is Coded character set
> ID . . . . . . . . :   37. I tried another directory "/public/platemp"
> which is Coded character set ID . . . . . . . . :   437.  I don't know
> why the "L" prefix is in the stack trace. It has always been that way as
> far as I can remember.
>
> I added a sendMessage method using the jt400 message queue function. I'm
> getting messages now. The System.out.println and System.err.println were
> never being written.
>
> By using the sendMessage method I've found the statement it is blowing
> up on:
>
>  MultipartRequest multi = new MultipartRequest(request, "/tmp", 5000
> * 1024, defaultFileRenamePolicy);
>
> Any more suggestions? Is there something wrong with my statement above?
>
> BTW, the upload.war application that comes with the com.oreilly.servlet
> packages blows up too.
>
> Thanx, PLA
>
>
> Sean Dockery wrote:
>
> > I doubt the JVM is the problem.  What version are you using, by the
> > way? (java -version)
> >
> > There is probably still something we're missing in your root cause...
> >
> > What is with the "L" prefix on some of the class names in the root
> > cause message?  Ljava/lang/String?  Those aren't actually in your
> > code?  Are they?  The "L" and "IL" a probably an artifact of the java
> > compiler, but maybe do a search for "Ljava" in your source code--just
> > to be sure...
> >
> > There is also mention of a FileRenamePolicy.  Do you have "write"
> > permissions to the area at which the uploaded file is to be copied?
> >
> > AS/400s use EBCDIC (crazy IBM sticking to their own inventions)
> > instead of ASCII.  Could that be a problem?
> >
> > At 21:50 2003-02-06 -0500, you wrote:
> >
> >> No difference in common.  I've installed 4.1.18 and still getting the
> >> same error. Could the AS/400 JVM be suspect?
> >>
> >> Thanx, PLA
> >>
> >>
> >>> root cause
> >>>
> >>> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
> >>>  java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
> >>>  java/lang/LinkageError.(Ljava/lang/String;)V+1
> >>> (LinkageError.java:39)
> >>>  java/lang/NoClassDefFoundError.(Ljava/lang/String;)V+1
> >>> (NoClassDefFoundError.java:43)
> >>>
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServl
etRequest;IZZ)V+23
> >>> (MultipartParser.java:114)
> >>>
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServl
etRequest;I)V+1
> >>> (MultipartParser.java:94)
> >>>
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest
;Ljava/lang/String;ILjava/lang/String;Lcom/oreilly/servlet/multipart/FileRen
amePolicy;)V+148
> >>> (MultipartRequest.java:219)
> >>>
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest
;Ljava/lang/String;ILcom/oreilly/servlet/multipart/FileRenamePolicy;)V+1
> >>> (MultipartRequest.java:148)
> >>>
FileUploadDownloadServlet3.performUpload(Ljavax/servlet/http/HttpServletRequ
est;Ljavax/servlet/http/HttpServletResponse;)V+0
> >>> (FileUploadDownloadServlet3.java:293)
> >>> FileUploadDownloadServlet3.doPost(Ljavax/servlet/http/HttpServletReque
st;Ljavax/servlet/http/HttpServletResponse;)V+0
> >>> (FileUploadDownloadServlet3.java:57)
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > Sean Dockery
> > [EMAIL PROTECTED]
> > Certified Java Web Component Developer
> > Certified Delphi Programmer
> > SBD Consultants
> > http://www.sbdconsultants.com
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically - resolved

2003-02-07 Thread Patrick L Archibald
I had a duplicate copy of cos.jar in the /QIBM/UserData/Java400/ext 
directory. I deleted it and it works now.

A big thank-you to everyone who responded!

PLA



Patrick L Archibald wrote:

I have servlet.jar in other directories but there is only one within 
the "/jakarta-tomcat-4.1.12" directory.  I've tried putting cos.jar in 
common/lib and shared/lib. No difference.

Thanx, PLA

Larry Meadors wrote:

I have gotten weird errors when more than one classloader loads a class.

With that in mind, is the servlet.jar in more than one place? Check in
$CLASSPATH, $CATALINA_HOME/common/lib, $CATALINA_HOME/server/lib,
$CATALINA_HOME/shared/lib, your applications WEB-INF/lib, and the
$JRE/lib/ext directory.

You might also check the location of the jar containing the
com/oreilly/servlet/MultipartRequest class. I would try to put it in
common/lib (the only place that servlet.jar should be) to make sure they
are loaded by the same classloader.

Larry

 

[EMAIL PROTECTED] 02/06/03 18:41 PM >>>
  


Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the

 IBM AS/400 running Tomcat 4.1.12. I've written hundreds of servlets on

the AS/400 and the PC and I've never had one beat me like this one. 
The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"

 but that is not logical since I have dozens of servlets running OK. 
Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
  java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
  java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)

javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0

(ServletException.java:132)

org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:201)

org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:168)

org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardWrapperValve.java:174)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)

org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardContextValve.java:153)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)

org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardContext.java:2395)

org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardHostValve.java:148)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorDispatcherValve.java:170)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorReportValve.java:172)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/a

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-07 Thread Patrick L Archibald
I have servlet.jar in other directories but there is only one within the 
"/jakarta-tomcat-4.1.12" directory.  I've tried putting cos.jar in 
common/lib and shared/lib. No difference.

Thanx, PLA

Larry Meadors wrote:

I have gotten weird errors when more than one classloader loads a class.

With that in mind, is the servlet.jar in more than one place? Check in
$CLASSPATH, $CATALINA_HOME/common/lib, $CATALINA_HOME/server/lib,
$CATALINA_HOME/shared/lib, your applications WEB-INF/lib, and the
$JRE/lib/ext directory.

You might also check the location of the jar containing the
com/oreilly/servlet/MultipartRequest class. I would try to put it in
common/lib (the only place that servlet.jar should be) to make sure they
are loaded by the same classloader.

Larry

 

[EMAIL PROTECTED] 02/06/03 18:41 PM >>>
   

Hi

I'm stumped on this problem. I've got a file upload servlet that works 
fine running on a PC with Tomcat 4.1.12 but I get the error below on the

 IBM AS/400 running Tomcat 4.1.12. I've written hundreds of servlets on

the AS/400 and the PC and I've never had one beat me like this one. The 
error says "NoClassDefFoundError: javax/servlet/http/HttpServletRequest"

 but that is not logical since I have dozens of servlets running OK. 
Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented 
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
  java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
  java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)

javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0

(ServletException.java:132)

org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:201)

org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:168)

org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardWrapperValve.java:174)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)

org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardContextValve.java:153)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)

org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardContext.java:2395)

org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardHostValve.java:148)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorDispatcherValve.java:170)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorReportValve.java:172)

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)

org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Respon

Re: File upload servlet won't run on IBM AS/400 but runs OK onPC configured identically

2003-02-07 Thread Larry Meadors
I have gotten weird errors when more than one classloader loads a class.

With that in mind, is the servlet.jar in more than one place? Check in
$CLASSPATH, $CATALINA_HOME/common/lib, $CATALINA_HOME/server/lib,
$CATALINA_HOME/shared/lib, your applications WEB-INF/lib, and the
$JRE/lib/ext directory.

You might also check the location of the jar containing the
com/oreilly/servlet/MultipartRequest class. I would try to put it in
common/lib (the only place that servlet.jar should be) to make sure they
are loaded by the same classloader.

Larry

>>> [EMAIL PROTECTED] 02/06/03 18:41 PM >>>
Hi

I'm stumped on this problem. I've got a file upload servlet that works 
fine running on a PC with Tomcat 4.1.12 but I get the error below on the

  IBM AS/400 running Tomcat 4.1.12. I've written hundreds of servlets on

the AS/400 and the PC and I've never had one beat me like this one. The 
error says "NoClassDefFoundError: javax/servlet/http/HttpServletRequest"

  but that is not logical since I have dozens of servlets running OK. 
Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented 
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
   java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
   java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
 
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0

(ServletException.java:132)
 
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:201)
 
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0

(ApplicationFilterChain.java:168)
 
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardWrapperValve.java:174)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)
 
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)
 
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)
 
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardContextValve.java:153)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)
 
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)
 
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)
 
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardContext.java:2395)
 
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardHostValve.java:148)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)
 
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorDispatcherValve.java:170)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)
 
org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(ErrorReportValve.java:172)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:636)
 
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(StandardPipeline.java:480)
 
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0

(ContainerBase.java:995)
 
org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0

(StandardEngineValve.java:146)
 
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/cat

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-07 Thread Patrick L Archibald
I'm going to try to get to the bottom of this for a little while longer. 
I checked out the link you provided. It looks simple enough. I may end 
up trying it.

Thanx, PLA

Evgeniy Strokin wrote:

I don't know will it help or not, but you could try
this parser:
http://www.jyaga.com/
I use it, it never fails yet)))

Jenya

--- Patrick L Archibald
<[EMAIL PROTECTED]> wrote:
 

Hi

I'm stumped on this problem. I've got a file upload
servlet that works 
fine running on a PC with Tomcat 4.1.12 but I get
the error below on the 
 IBM AS/400 running Tomcat 4.1.12. I've written
hundreds of servlets on 
the AS/400 and the PC and I've never had one beat me
like this one. The 
error says "NoClassDefFoundError:
javax/servlet/http/HttpServletRequest" 
 but that is not logical since I have dozens of
servlets running OK. 
Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error
() that prevented 
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution
threw an exception
  java/lang/Throwable.(Ljava/lang/String;)V+4
(Throwable.java:90)
  java/lang/Exception.(Ljava/lang/String;)V+1
(Exception.java:38)


   

javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0
 

(ServletException.java:132)


   

org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
 

(ApplicationFilterChain.java:201)


   

org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
 

(ApplicationFilterChain.java:168)


   

org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(StandardWrapperValve.java:174)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:480)


   

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(ContainerBase.java:995)


   

org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(StandardContextValve.java:153)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:480)


   

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(ContainerBase.java:995)


   

org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardContext.java:2395)


   

org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(StandardHostValve.java:148)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(ErrorDispatcherValve.java:170)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(ErrorReportValve.java:172)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:480)


   

org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(ContainerBase.java:995)


   

org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
 

(StandardEngineValve.java:146)


   

org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
 

(StandardPipeline.java:636)


   

org/apac

Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-07 Thread Evgeniy Strokin
I don't know will it help or not, but you could try
this parser:
http://www.jyaga.com/
I use it, it never fails yet)))

Jenya

--- Patrick L Archibald
<[EMAIL PROTECTED]> wrote:
> Hi
> 
> I'm stumped on this problem. I've got a file upload
> servlet that works 
> fine running on a PC with Tomcat 4.1.12 but I get
> the error below on the 
>   IBM AS/400 running Tomcat 4.1.12. I've written
> hundreds of servlets on 
> the AS/400 and the PC and I've never had one beat me
> like this one. The 
> error says "NoClassDefFoundError:
> javax/servlet/http/HttpServletRequest" 
>   but that is not logical since I have dozens of
> servlets running OK. 
> Any one have any suggestions?
> 
> Thanx, PLA
> 
> 
> 
> HTTP Status 500 -
> 
> type Exception report
> 
> message
> 
> description The server encountered an internal error
> () that prevented 
> it from fulfilling this request.
> 
> exception
> 
> javax.servlet.ServletException: Servlet execution
> threw an exception
>java/lang/Throwable.(Ljava/lang/String;)V+4
> (Throwable.java:90)
>java/lang/Exception.(Ljava/lang/String;)V+1
> (Exception.java:38)
>  
>
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0
> 
> (ServletException.java:132)
>  
>
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
> (ApplicationFilterChain.java:201)
>  
>
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
> (ApplicationFilterChain.java:168)
>  
>
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (StandardWrapperValve.java:174)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:480)
>  
>
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (ContainerBase.java:995)
>  
>
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (StandardContextValve.java:153)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:480)
>  
>
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (ContainerBase.java:995)
>  
>
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardContext.java:2395)
>  
>
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (StandardHostValve.java:148)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (ErrorDispatcherValve.java:170)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (ErrorReportValve.java:172)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:480)
>  
>
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (ContainerBase.java:995)
>  
>
org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
> (StandardEngineValve.java:146)
>  
>
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
> (StandardPipeline.java:636)
>  
>
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response

Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-07 Thread Patrick L Archibald
I've tried JVM 1.2 and 1.3. The public (meaning valid users) have all 
authority to the "/tmp" directory. This direcoty is Coded character set 
ID . . . . . . . . :   37. I tried another directory "/public/platemp" 
which is Coded character set ID . . . . . . . . :   437.  I don't know 
why the "L" prefix is in the stack trace. It has always been that way as 
far as I can remember.

I added a sendMessage method using the jt400 message queue function. I'm 
getting messages now. The System.out.println and System.err.println were 
never being written.

By using the sendMessage method I've found the statement it is blowing 
up on:

MultipartRequest multi = new MultipartRequest(request, "/tmp", 5000 
* 1024, defaultFileRenamePolicy);

Any more suggestions? Is there something wrong with my statement above?

BTW, the upload.war application that comes with the com.oreilly.servlet 
packages blows up too.

Thanx, PLA


Sean Dockery wrote:

I doubt the JVM is the problem.  What version are you using, by the 
way? (java -version)

There is probably still something we're missing in your root cause...

What is with the "L" prefix on some of the class names in the root 
cause message?  Ljava/lang/String?  Those aren't actually in your 
code?  Are they?  The "L" and "IL" a probably an artifact of the java 
compiler, but maybe do a search for "Ljava" in your source code--just 
to be sure...

There is also mention of a FileRenamePolicy.  Do you have "write" 
permissions to the area at which the uploaded file is to be copied?

AS/400s use EBCDIC (crazy IBM sticking to their own inventions) 
instead of ASCII.  Could that be a problem?

At 21:50 2003-02-06 -0500, you wrote:

No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA


root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/LinkageError.(Ljava/lang/String;)V+1 
(LinkageError.java:39)
 java/lang/NoClassDefFoundError.(Ljava/lang/String;)V+1 
(NoClassDefFoundError.java:43)
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;IZZ)V+23 
(MultipartParser.java:114)
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;I)V+1 
(MultipartParser.java:94)
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;ILjava/lang/String;Lcom/oreilly/servlet/multipart/FileRenamePolicy;)V+148 
(MultipartRequest.java:219)
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;ILcom/oreilly/servlet/multipart/FileRenamePolicy;)V+1 
(MultipartRequest.java:148)
FileUploadDownloadServlet3.performUpload(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 
(FileUploadDownloadServlet3.java:293)
FileUploadDownloadServlet3.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 
(FileUploadDownloadServlet3.java:57)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Sean Dockery
What is the path separator character on the AS400?  Is it the same 
character EBCDIC as ASCII?

At 22:43 2003-02-06 -0500, you wrote:
I'll try this tomorrow.

Thanx, PLA

Tim Funk wrote:


Just for giggles ... Alter catalina.sh to export CLASSPATH and don't pass 
CLASSPATH to the java executable.

The AS400 JVM is really freakin weird when we once tried passing 
classpath via command line then got a different behavior setting 
classpath via an environment variable.

If that doesn't work - I'm all out of ideas.

You may want to also examine some properties file that the AS400 has that 
sets system properties (like java.class.path) - I forget the filename but 
it is an IBM or AS400 specific thing I never heard of before. There is 
probably(?) a copy in your home directory.

-Tim


Patrick L Archibald wrote:

No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF is 
uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:



I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:



Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written 
hundreds of servlets on the AS/400 and the PC and I've never had one 
beat me like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical 
since I have dozens of servlets running OK. Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/

Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Sean Dockery
I doubt the JVM is the problem.  What version are you using, by the way? 
(java -version)

There is probably still something we're missing in your root cause...

What is with the "L" prefix on some of the class names in the root cause 
message?  Ljava/lang/String?  Those aren't actually in your code?  Are 
they?  The "L" and "IL" a probably an artifact of the java compiler, but 
maybe do a search for "Ljava" in your source code--just to be sure...

There is also mention of a FileRenamePolicy.  Do you have "write" 
permissions to the area at which the uploaded file is to be copied?

AS/400s use EBCDIC (crazy IBM sticking to their own inventions) instead of 
ASCII.  Could that be a problem?

At 21:50 2003-02-06 -0500, you wrote:
No difference in common.  I've installed 4.1.18 and still getting the same 
error. Could the AS/400 JVM be suspect?

Thanx, PLA


root cause

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/LinkageError.(Ljava/lang/String;)V+1 (LinkageError.java:39)
 java/lang/NoClassDefFoundError.(Ljava/lang/String;)V+1 
(NoClassDefFoundError.java:43)
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;IZZ)V+23 
(MultipartParser.java:114)
com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;I)V+1 
(MultipartParser.java:94)
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;ILjava/lang/String;Lcom/oreilly/servlet/multipart/FileRenamePolicy;)V+148 
(MultipartRequest.java:219)
com/oreilly/servlet/MultipartRequest.(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;ILcom/oreilly/servlet/multipart/FileRenamePolicy;)V+1 
(MultipartRequest.java:148)
FileUploadDownloadServlet3.performUpload(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 
(FileUploadDownloadServlet3.java:293)
FileUploadDownloadServlet3.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V+0 
(FileUploadDownloadServlet3.java:57)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Patrick L Archibald
/jakarta-tomcat-4.1.12/common/lib/servlet.jar

Thanx, PLA

Sean Dockery wrote:


This may be a silly question, but where is your "servlets.jar" located?

At 21:50 2003-02-06 -0500, you wrote:


No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF 
is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs 
OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:



I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that 
the O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib 
folder.

At 20:40 2003-02-06 -0500, you wrote:



Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written 
hundreds of servlets on the AS/400 and the PC and I've never had 
one beat me like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical 
since I have dozens of servlets running OK. Any one have any 
suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/St

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-06 Thread Patrick L Archibald
I'll try this tomorrow.

Thanx, PLA

Tim Funk wrote:


Just for giggles ... Alter catalina.sh to export CLASSPATH and don't 
pass CLASSPATH to the java executable.

The AS400 JVM is really freakin weird when we once tried passing 
classpath via command line then got a different behavior setting 
classpath via an environment variable.

If that doesn't work - I'm all out of ideas.

You may want to also examine some properties file that the AS400 has 
that sets system properties (like java.class.path) - I forget the 
filename but it is an IBM or AS400 specific thing I never heard of 
before. There is probably(?) a copy in your home directory.

-Tim


Patrick L Archibald wrote:

No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF 
is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs 
OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

 

I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that 
the O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib 
folder.

At 20:40 2003-02-06 -0500, you wrote:

 

Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written 
hundreds of servlets on the AS/400 and the PC and I've never had 
one beat me like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical 
since I have dozens of servlets running OK. Any one have any 
suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve

Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Sean Dockery
This may be a silly question, but where is your "servlets.jar" located?

At 21:50 2003-02-06 -0500, you wrote:

No difference in common.  I've installed 4.1.18 and still getting the same 
error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF is 
uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:



I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:



Hi

I'm stumped on this problem. I've got a file upload servlet that works 
fine running on a PC with Tomcat 4.1.12 but I get the error below on 
the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds of 
servlets on the AS/400 and the PC and I've never had one beat me like 
this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical since 
I have dozens of servlets running OK. Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented 
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Req

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-06 Thread Tim Funk
Just for giggles ... Alter catalina.sh to export CLASSPATH and don't 
pass CLASSPATH to the java executable.

The AS400 JVM is really freakin weird when we once tried passing 
classpath via command line then got a different behavior setting 
classpath via an environment variable.

If that doesn't work - I'm all out of ideas.

You may want to also examine some properties file that the AS400 has 
that sets system properties (like java.class.path) - I forget the 
filename but it is an IBM or AS400 specific thing I never heard of 
before. There is probably(?) a copy in your home directory.

-Tim


Patrick L Archibald wrote:
No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF 
is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

 

I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:

 

Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written 
hundreds of servlets on the AS/400 and the PC and I've never had 
one beat me like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical 
since I have dozens of servlets running OK. Any one have any 
suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apach

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-06 Thread Patrick L Archibald
No difference in common.  I've installed 4.1.18 and still getting the 
same error. Could the AS/400 JVM be suspect?

Thanx, PLA

Patrick L Archibald wrote:

I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in
TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF 
is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest", right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

 

I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:

  

Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written 
hundreds of servlets on the AS/400 and the PC and I've never had 
one beat me like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical 
since I have dozens of servlets running OK. Any one have any 
suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorReportValve.i

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-06 Thread Patrick L Archibald
I haven't tried putting it in common but I did try putting it in
/jakarta-tomcat-4.1.12/shared/lib  and it gave me the same error.

I will try common and let ya know shortly.

Here is the case-sensitive path that it is in now:
/jakarta-tomcat-4.1.12/webapps/ROOT/WEB-INF/lib



Thanx, PLA

Filip Hanik wrote:


and what happens if you put it in 

TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest", 
right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

 

I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:

   

Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds 
of servlets on the AS/400 and the PC and I've never had one beat me 
like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical since 
I have dozens of servlets running OK. Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
 java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
 java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorReportValve.java:172)
org/apache/catalina/core/StandardPi

RE: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Filip Hanik
and what happens if you put it in 

TOMCAT_HOME/common/lib

also, did you intentionally lowercase the path you sent us, WEB-INF is uppercase.
Filip

-Original Message-
From: Patrick L Archibald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:55 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest", 
right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

> I would suspect that it can find 
> "com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
> O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.
>
> At 20:40 2003-02-06 -0500, you wrote:
>
>> Hi
>>
>> I'm stumped on this problem. I've got a file upload servlet that 
>> works fine running on a PC with Tomcat 4.1.12 but I get the error 
>> below on the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds 
>> of servlets on the AS/400 and the PC and I've never had one beat me 
>> like this one. The error says "NoClassDefFoundError: 
>> javax/servlet/http/HttpServletRequest"  but that is not logical since 
>> I have dozens of servlets running OK. Any one have any suggestions?
>>
>> Thanx, PLA
>>
>>
>>
>> HTTP Status 500 -
>>
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that 
>> prevented it from fulfilling this request.
>>
>> exception
>>
>> javax.servlet.ServletException: Servlet execution threw an exception
>>   java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
>>   java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
>> javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
>> (ServletException.java:132)
>> 
>org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
>> (ApplicationFilterChain.java:201)
>> 
>org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
>> (ApplicationFilterChain.java:168)
>> 
>org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>> (StandardWrapperValve.java:174)
>> 
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardPipeline.java:636)
>> 
>org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardPipeline.java:480)
>> 
>org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (ContainerBase.java:995)
>> 
>org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>> (StandardContextValve.java:153)
>> 
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardPipeline.java:636)
>> 
>org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardPipeline.java:480)
>> 
>org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (ContainerBase.java:995)
>> 
>org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardContext.java:2395)
>> 
>org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>> (StandardHostValve.java:148)
>> 
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>> (StandardPipeline.java:636)
>> 
>org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>> (ErrorDispatcherValve.java:170)
>> 
>org/apache/catali

Re: File upload servlet won't run on IBM AS/400 but runs OK on PCconfigured identically

2003-02-06 Thread Patrick L Archibald
If I were missing the classes for the cos.jar I would get 
"java.lang.NoClassDefFoundError: 
com/oreilly/servlet/multipart/FileRenamePolicy" not 
"java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest", 
right?

I've got cos.jar in /jakarta-tomcat-4.1.12/webapps/root/web-inf/lib

Thanx for any and all suggestions, PLA

Sean Dockery wrote:

I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:

Hi

I'm stumped on this problem. I've got a file upload servlet that 
works fine running on a PC with Tomcat 4.1.12 but I get the error 
below on the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds 
of servlets on the AS/400 and the PC and I've never had one beat me 
like this one. The error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical since 
I have dozens of servlets running OK. Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
  java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
  java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorReportValve.java:172)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardEngineValve.java:146)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/

RE: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Filip Hanik
not really, if you look at the stack trace, it shows that it is inside the 
MultipartParser class by line number

but out of curiousity, where do you place your Oreilly jar?

>java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
>   java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
>   java/lang/LinkageError.(Ljava/lang/String;)V+1 (LinkageError.java:39)
>   java/lang/NoClassDefFoundError.(Ljava/lang/String;)V+1 
> (NoClassDefFoundError.java:43)
>com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;IZZ)V+23
> 
>(MultipartParser.java:114)
>com/oreilly/servlet/multipart/MultipartParser.(Ljavax/servlet/http/HttpServletRequest;I)V+1
> 
>(MultipartParser.java:94)


Filip

-Original Message-
From: Sean Dockery [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 5:51 PM
To: Tomcat Users List
Subject: Re: File upload servlet won't run on IBM AS/400 but runs OK on
PC configured identically


I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:
>Hi
>
>I'm stumped on this problem. I've got a file upload servlet that works 
>fine running on a PC with Tomcat 4.1.12 but I get the error below on 
>the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds of servlets 
>on the AS/400 and the PC and I've never had one beat me like this one. The 
>error says "NoClassDefFoundError: 
>javax/servlet/http/HttpServletRequest"  but that is not logical since I 
>have dozens of servlets running OK. Any one have any suggestions?
>
>Thanx, PLA
>
>
>
>HTTP Status 500 -
>
>type Exception report
>
>message
>
>description The server encountered an internal error () that prevented it 
>from fulfilling this request.
>
>exception
>
>javax.servlet.ServletException: Servlet execution threw an exception
>   java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
>   java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
>javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
>(ServletException.java:132)
>org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
>(ApplicationFilterChain.java:201)
>org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0
> 
>(ApplicationFilterChain.java:168)
>org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>(StandardWrapperValve.java:174)
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardPipeline.java:636)
>org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardPipeline.java:480)
>org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(ContainerBase.java:995)
>org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>(StandardContextValve.java:153)
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardPipeline.java:636)
>org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardPipeline.java:480)
>org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(ContainerBase.java:995)
>org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardContext.java:2395)
>org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>(StandardHostValve.java:148)
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(StandardPipeline.java:636)
>org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0
> 
>(ErrorDispatcherValve.java:170)
>org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0
> 
>(Stan

Re: File upload servlet won't run on IBM AS/400 but runs OK on PC configured identically

2003-02-06 Thread Sean Dockery
I would suspect that it can find 
"com/oreilly/servlet/multipart/MultipartParser".  Make sure that the 
O'Reilly JAR in your common/lib folder or /myapp/WEB-INF/lib folder.

At 20:40 2003-02-06 -0500, you wrote:
Hi

I'm stumped on this problem. I've got a file upload servlet that works 
fine running on a PC with Tomcat 4.1.12 but I get the error below on 
the  IBM AS/400 running Tomcat 4.1.12. I've written hundreds of servlets 
on the AS/400 and the PC and I've never had one beat me like this one. The 
error says "NoClassDefFoundError: 
javax/servlet/http/HttpServletRequest"  but that is not logical since I 
have dozens of servlets running OK. Any one have any suggestions?

Thanx, PLA



HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
  java/lang/Throwable.(Ljava/lang/String;)V+4 (Throwable.java:90)
  java/lang/Exception.(Ljava/lang/String;)V+1 (Exception.java:38)
javax/servlet/ServletException.(Ljava/lang/String;Ljava/lang/Throwable;)V+0 
(ServletException.java:132)
org/apache/catalina/core/ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:201)
org/apache/catalina/core/ApplicationFilterChain.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V+0 
(ApplicationFilterChain.java:168)
org/apache/catalina/core/StandardWrapperValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardWrapperValve.java:174)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContextValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardContextValve.java:153)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardContext.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardContext.java:2395)
org/apache/catalina/core/StandardHostValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardHostValve.java:148)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorDispatcherValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorDispatcherValve.java:170)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/valves/ErrorReportValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(ErrorReportValve.java:172)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/catalina/core/StandardEngineValve.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;Lorg/apache/catalina/ValveContext;)V+0 
(StandardEngineValve.java:146)
org/apache/catalina/core/StandardPipeline$StandardPipelineValveContext.invokeNext(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:636)
org/apache/catalina/core/StandardPipeline.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(StandardPipeline.java:480)
org/apache/catalina/core/ContainerBase.invoke(Lorg/apache/catalina/Request;Lorg/apache/catalina/Response;)V+0 
(ContainerBase.java:995)
org/apache/coyote/tomcat4/CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Respons

Re: file upload using POST

2002-06-06 Thread Dennis Muhlestein

jakarta struts project has file upload capability but I haven't ever
looked at it.  They have an example war file too.

-Dennis

On Thu, 2002-06-06 at 12:26, Ushakov, Sergey N wrote:
> Sorry, I'm sure my question is a FAQ, but I still can't find an answer.
> 
> Does Jakarta/Tomcat have a standard facility for file upload processing
> using POST?
> 
> I have searched the Tomcat 4 docs, but did not find any trace.
> 
> JGuru mentions the org.apache.tomcat.request.ParseMime class, but it seems
> to be absent from present Tomcat release. And from CVS tree also.
> 
> Seems that most people use Jason Hunter's MultipartRequest . Is it the best
> choice for Tomcat?
> 
> Regards,
> Sergey Ushakov
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: file upload using POST

2002-06-06 Thread Phillip Morelock

> Seems that most people use Jason Hunter's MultipartRequest . Is it the best
> choice for Tomcat?

That's what I personally use.

fillup


On 6/6/02 11:26 AM, "Ushakov, Sergey N" <[EMAIL PROTECTED]> wrote:

> Sorry, I'm sure my question is a FAQ, but I still can't find an answer.
> 
> Does Jakarta/Tomcat have a standard facility for file upload processing
> using POST?
> 
> I have searched the Tomcat 4 docs, but did not find any trace.
> 
> JGuru mentions the org.apache.tomcat.request.ParseMime class, but it seems
> to be absent from present Tomcat release. And from CVS tree also.
> 
> Seems that most people use Jason Hunter's MultipartRequest . Is it the best
> choice for Tomcat?
> 
> Regards,
> Sergey Ushakov
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: file upload using POST

2002-06-06 Thread Reynir Hubner

hi, 

Tomcat does not have any "standard facility" for fileuploads (at least not last time I 
looked).

You need a multipart request parser. As you mentioned O'reilly provides something 
called MultiPartRequest or something like that.
You should be able to download it from their site.

I dont know if it "is the best" but it's "free" and it seems many people like using 
it. 
There are serveral others though, for my self, I thought the license to use oreilly's 
classes was not what I wanted so I implemented my own requestparser, that's not so 
complicated anyways.

hope it helps
-reynir


> -Original Message-
> From: Ushakov, Sergey N [mailto:[EMAIL PROTECTED]]
> Sent: 6. juni 2002 18:26
> To: [EMAIL PROTECTED]
> Subject: file upload using POST
> 
> 
> Sorry, I'm sure my question is a FAQ, but I still can't find 
> an answer.
> 
> Does Jakarta/Tomcat have a standard facility for file upload 
> processing
> using POST?
> 
> I have searched the Tomcat 4 docs, but did not find any trace.
> 
> JGuru mentions the org.apache.tomcat.request.ParseMime class, 
> but it seems
> to be absent from present Tomcat release. And from CVS tree also.
> 
> Seems that most people use Jason Hunter's MultipartRequest . 
> Is it the best
> choice for Tomcat?
> 
> Regards,
> Sergey Ushakov
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: File upload problem

2002-02-13 Thread Miguel Angel Medina Lopez

I have downloaded the last version of the webapp connector form the cvs,
however the problem persists. I'll have to go back to the version 3.2.3 of
Tomcat and use the old mod_jk connector thats work fine with the same
uploads. Any suggestion? Thank you

- Original Message -
From: "Craig Altenburg" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 10:03 PM
Subject: Re: File upload problem


> I have the same problem -- it seemd to go away in the beta of 4.0.2 -- I'm
> trying to get the final 4.0.2 up to see if that fixes the problem.
>
>
> On Tuesday 12 February 2002 03:01 pm, you wrote:
> > Hi:
> >
> > If I upload the files running tomcat stand alone all work fine. That's
the
> > reason to think is a connector problem, but I don't  know how can I
solve
> > it or if exists a version of the connector that the repair the bug. I
need
> > help.
> >
> > Thanks.
> > -
> > Miguel Ángel Medina López
> > Logic Factory: www.logic-factory.com
> > Granada - España
> >
> >
> >
> > - Original Message -----
> > From: "Brian Adams" <[EMAIL PROTECTED]>
> > To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 12, 2002 8:32 PM
> > Subject: RE: File upload problem
> >
> > > it can be a bug or not...
> > > If you have tomcat running in stand alone(localhost:8080) as well as
> >
> > webapp
> >
> > > you can test the servlet by connecting directly to tomcat and see if
it
> > > works if it does, then you are probably affected by a webapp bug(the
one
> >
> > you
> >
> > > read about)
> > > B
> > >
> > > -Original Message-
> > > From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, February 12, 2002 1:36 PM
> > > To: Tomcat Users
> > > Subject: File upload problem
> > >
> > >
> > > Hi all:
> > >
> > > I'm using Tomcat 4.0.1 and Apache 1.3.23. Also I use oreilly
> > > MultipartWrapper Class to parse multipart-form-data encoding. The
problem
> >
> > is
> >
> > > that the next exception is thrown when I try to upload a file:
> > >
> > > java.io.IOException: unexpected end of part
> > > at
> >
> >
com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:95)
> >
> > > at
> >
> >
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:178
> >)
> >
> > > Sometimes the file is uploaded but it's broken because the size isn't
> >
> > well,
> >
> > > it less than the original. I have read in the list that there was a
bug
> >
> > int
> >
> > > the connectors, I'm using the module webapp-module-1.0.1-tc401 to
connect
> > > tomcat and apache. Is this a bug? How can I solve the problem?
> > >
> > > Than you all.
> > >
> > > -
> > > Miguel Ángel Medina López
> > > Logic Factory: www.logic-factory.com
> > > Granada - España
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > > For additional commands: <mailto:[EMAIL PROTECTED]>
> > > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> > >
> > > --
> > > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > > For additional commands: <mailto:[EMAIL PROTECTED]>
> > > Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: File upload problem

2002-02-12 Thread Craig Altenburg

I have the same problem -- it seemd to go away in the beta of 4.0.2 -- I'm 
trying to get the final 4.0.2 up to see if that fixes the problem.


On Tuesday 12 February 2002 03:01 pm, you wrote:
> Hi:
>
> If I upload the files running tomcat stand alone all work fine. That's the
> reason to think is a connector problem, but I don't  know how can I solve
> it or if exists a version of the connector that the repair the bug. I need
> help.
>
> Thanks.
> -
> Miguel Ángel Medina López
> Logic Factory: www.logic-factory.com
> Granada - España
>
>
>
> - Original Message -
> From: "Brian Adams" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 12, 2002 8:32 PM
> Subject: RE: File upload problem
>
> > it can be a bug or not...
> > If you have tomcat running in stand alone(localhost:8080) as well as
>
> webapp
>
> > you can test the servlet by connecting directly to tomcat and see if it
> > works if it does, then you are probably affected by a webapp bug(the one
>
> you
>
> > read about)
> > B
> >
> > -Original Message-
> > From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 12, 2002 1:36 PM
> > To: Tomcat Users
> > Subject: File upload problem
> >
> >
> > Hi all:
> >
> > I'm using Tomcat 4.0.1 and Apache 1.3.23. Also I use oreilly
> > MultipartWrapper Class to parse multipart-form-data encoding. The problem
>
> is
>
> > that the next exception is thrown when I try to upload a file:
> >
> > java.io.IOException: unexpected end of part
> > at
>
> com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:95)
>
> > at
>
> com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:178
>)
>
> > Sometimes the file is uploaded but it's broken because the size isn't
>
> well,
>
> > it less than the original. I have read in the list that there was a bug
>
> int
>
> > the connectors, I'm using the module webapp-module-1.0.1-tc401 to connect
> > tomcat and apache. Is this a bug? How can I solve the problem?
> >
> > Than you all.
> >
> > -
> > Miguel Ángel Medina López
> > Logic Factory: www.logic-factory.com
> > Granada - España
> >
> >
> >
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: File upload problem

2002-02-12 Thread Brian Adams

yes, well if you can't fix the bug try two things:
1. upgrade to 4.0.2 and try again
2. switch to mod_jk instead of mod_webapp.
goodluck,
B

-Original Message-
From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 2:01 PM
To: Tomcat Users List
Subject: Re: File upload problem


Hi:

If I upload the files running tomcat stand alone all work fine. That's the
reason to think is a connector problem, but I don't  know how can I solve it
or if exists a version of the connector that the repair the bug. I need
help.

Thanks.
-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España



- Original Message -
From: "Brian Adams" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 8:32 PM
Subject: RE: File upload problem


> it can be a bug or not...
> If you have tomcat running in stand alone(localhost:8080) as well as
webapp
> you can test the servlet by connecting directly to tomcat and see if it
> works if it does, then you are probably affected by a webapp bug(the one
you
> read about)
> B
>
> -Original Message-
> From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 1:36 PM
> To: Tomcat Users
> Subject: File upload problem
>
>
> Hi all:
>
> I'm using Tomcat 4.0.1 and Apache 1.3.23. Also I use oreilly
> MultipartWrapper Class to parse multipart-form-data encoding. The problem
is
> that the next exception is thrown when I try to upload a file:
>
> java.io.IOException: unexpected end of part
> at
>
com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:95)
> at
>
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:178)
>
> Sometimes the file is uploaded but it's broken because the size isn't
well,
> it less than the original. I have read in the list that there was a bug
int
> the connectors, I'm using the module webapp-module-1.0.1-tc401 to connect
> tomcat and apache. Is this a bug? How can I solve the problem?
>
> Than you all.
>
> -
> Miguel Ángel Medina López
> Logic Factory: www.logic-factory.com
> Granada - España
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: File upload problem

2002-02-12 Thread Miguel Angel Medina Lopez

Hi:

If I upload the files running tomcat stand alone all work fine. That's the
reason to think is a connector problem, but I don't  know how can I solve it
or if exists a version of the connector that the repair the bug. I need
help.

Thanks.
-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España



- Original Message -
From: "Brian Adams" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 8:32 PM
Subject: RE: File upload problem


> it can be a bug or not...
> If you have tomcat running in stand alone(localhost:8080) as well as
webapp
> you can test the servlet by connecting directly to tomcat and see if it
> works if it does, then you are probably affected by a webapp bug(the one
you
> read about)
> B
>
> -Original Message-
> From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 1:36 PM
> To: Tomcat Users
> Subject: File upload problem
>
>
> Hi all:
>
> I'm using Tomcat 4.0.1 and Apache 1.3.23. Also I use oreilly
> MultipartWrapper Class to parse multipart-form-data encoding. The problem
is
> that the next exception is thrown when I try to upload a file:
>
> java.io.IOException: unexpected end of part
> at
>
com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:95)
> at
>
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:178)
>
> Sometimes the file is uploaded but it's broken because the size isn't
well,
> it less than the original. I have read in the list that there was a bug
int
> the connectors, I'm using the module webapp-module-1.0.1-tc401 to connect
> tomcat and apache. Is this a bug? How can I solve the problem?
>
> Than you all.
>
> -
> Miguel Ángel Medina López
> Logic Factory: www.logic-factory.com
> Granada - España
>
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: File upload problem

2002-02-12 Thread Brian Adams

it can be a bug or not...
If you have tomcat running in stand alone(localhost:8080) as well as webapp
you can test the servlet by connecting directly to tomcat and see if it
works if it does, then you are probably affected by a webapp bug(the one you
read about)
B

-Original Message-
From: Miguel Angel Medina Lopez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 1:36 PM
To: Tomcat Users
Subject: File upload problem


Hi all:

I'm using Tomcat 4.0.1 and Apache 1.3.23. Also I use oreilly
MultipartWrapper Class to parse multipart-form-data encoding. The problem is
that the next exception is thrown when I try to upload a file:

java.io.IOException: unexpected end of part
at
com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:95)
at
com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:178)

Sometimes the file is uploaded but it's broken because the size isn't well,
it less than the original. I have read in the list that there was a bug int
the connectors, I'm using the module webapp-module-1.0.1-tc401 to connect
tomcat and apache. Is this a bug? How can I solve the problem?

Than you all.

-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: File upload won't work with Tomcat4 ...

2001-12-20 Thread Craig R. McClanahan



On Thu, 20 Dec 2001, martin eberle wrote:

>
> Question 1:
> >From which base directory does tomcat try to access the data dir?
> (/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??...
>

>From whatever directory Tomcat itself is running.  That varies between
different versions of Tomcat (and also depends on how you start it), so
you cannot make *any* assumptions.

> Question 2:
> Is my savePath definition just wrong?
>

Yes.

You've got two choices:

* Get the pathname of the document root for your webapp, and compute
  the path you want from there (this only works if you run your app
  in an unpacked directory - it won't be portable to all containers):

String base = getServletContext.getRealPath("/");
if (!base.endsWith("/"))
base += "/";
base += "data/attachments/";

* Pass the absolute pathname of the attachments directory as a servlet
  initialization parameter.

> What i'm wondering about: with Tomcat 3.2x, the fileupload worked as
> well 
>

Only by coincidence.

> Thx for any answers ...
>
> Regards,
> -martin
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: File upload won't work with Tomcat4 ...

2001-12-20 Thread Bongiorno.Christian

Here is the code I use for uploading... It's like 5 lines...Ok, I made it a smidge 
more complicated -- this is the cool-kid version. You know, "production quality"

Didn't mean to be a pain -- didn't feel like openning my IDE and logging into the 
network

Chris


  private void upLoadZipFile(String zipFileName,HttpServletResponse response)
  {
byte[] data   = null;
try
{
  ServletOutputStream stream= response.getOutputStream();
  BufferedInputStream fromFile  = new BufferedInputStream(new 
FileInputStream(this.pathToZips + zipFileName));

  response.setContentType("application/x-zip-compressed");
  response.setHeader("Content-Disposition", "attachment; filename=" + zipFileName 
+ ";");

  while(fromFile.available() > 0)
  {
data = new byte[fromFile.available()];
fromFile.read(data,0,fromFile.available());
stream.write(data);
  }
}
catch(IOException e) {
  e.fillInStackTrace().printStackTrace();
}
finally {
  try {
fromFile.close();
stream.close();
  }
  catch(Exception exc) {
   exc.fillInStackTrace().printStackTrace();
  }
}

  }





-Original Message-
From: martin eberle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 8:49 AM
To: Tomcat Users List
Subject: AW: File upload won't work with Tomcat4 ...


hmmm, thx for the hint, but i've checked out google by nearly the same
keywords and websites in result  ;)

i'm in position to think, it's any logical error in my code, not
caused by tomcat .. hmm .. anyway, thx for supporting me ... 

-martin

-Ursprüngliche Nachricht-
Von: Bongiorno.Christian [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 20. Dezember 2001 14:43
An: Tomcat Users List
Betreff: RE: File upload won't work with Tomcat4 ...


I sniffed around google for 10 minutes and came up with perfect and
simple code for this task.

Look under 
"java servlet http upload"



-Original Message-
From: martin eberle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 3:42 AM
To: [EMAIL PROTECTED]
Subject: File upload won't work with Tomcat4 ...


Hi,

i try to upload any stuff (mostly .zip, .doc, .xls, .txt) - but it
doesn't matter which filetype, the result
is always the same:

Apache Tomcat/4.0.1 - HTTP Status 404 -
../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
found)
type Status report
message ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File
not found)
description The requested resource
../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
found)) is not available.

I know, that the file has not been found, cause i try to create it ;)
... 

Tomcat directory structure to .jsp files (oh, directory / file user
rights, etc. has been set correctly!):
/var/tomcat4/webapps/mywebapp/

Tomcat directory structure to data (upload) files:
/var/tomcat4/webapps/mywebapp/data/attachements/

In my upload class, i've defined the var "SAVEPATH" which contain's the
store path as string ... :
String savePath="../webapps/mywebapp/data/attachements/";

Question 1:
>From which base directory does tomcat try to access the data dir?
(/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??...

Question 2:
Is my savePath definition just wrong?

What i'm wondering about: with Tomcat 3.2x, the fileupload worked as
well 

Thx for any answers ...

Regards,
-martin

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: File upload won't work with Tomcat4 ...

2001-12-20 Thread Bongiorno.Christian

I sniffed around google for 10 minutes and came up with perfect and simple code for 
this task.

Look under 
"java servlet http upload"



-Original Message-
From: martin eberle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 3:42 AM
To: [EMAIL PROTECTED]
Subject: File upload won't work with Tomcat4 ...


Hi,

i try to upload any stuff (mostly .zip, .doc, .xls, .txt) - but it
doesn't matter which filetype, the result
is always the same:

Apache Tomcat/4.0.1 - HTTP Status 404 -
../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
found)
type Status report
message ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File
not found)
description The requested resource
../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
found)) is not available.

I know, that the file has not been found, cause i try to create it ;)
... 

Tomcat directory structure to .jsp files (oh, directory / file user
rights, etc. has been set correctly!):
/var/tomcat4/webapps/mywebapp/

Tomcat directory structure to data (upload) files:
/var/tomcat4/webapps/mywebapp/data/attachements/

In my upload class, i've defined the var "SAVEPATH" which contain's the
store path as string ... :
String savePath="../webapps/mywebapp/data/attachements/";

Question 1:
>From which base directory does tomcat try to access the data dir?
(/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??...

Question 2:
Is my savePath definition just wrong?

What i'm wondering about: with Tomcat 3.2x, the fileupload worked as
well 

Thx for any answers ...

Regards,
-martin

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: File upload won't work with Tomcat4 ...

2001-12-20 Thread Lester June Cabrera


Try to upload to upload your data files in the apache htdocs directory and 
access them via your JSP files from there. This is our setup in our 
webhosting company. All our JSP apps are in /webapps directory. And all the 
rest of the files (*.html, *gif, *.jpg, *.zip) are in /htdocs.



At 09:42 AM 12/20/01 +0100, martin eberle wrote:
>Hi,
>
>i try to upload any stuff (mostly .zip, .doc, .xls, .txt) - but it
>doesn't matter which filetype, the result
>is always the same:
>
>Apache Tomcat/4.0.1 - HTTP Status 404 -
>../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
>found)
>type Status report
>message ../webapps/mywebapp/data/attachements/61_7781091_win.ini (File
>not found)
>description The requested resource
>../webapps/mywebapp/data/attachements/61_7781091_win.ini (File not
>found)) is not available.
>
>I know, that the file has not been found, cause i try to create it ;)
>...
>
>Tomcat directory structure to .jsp files (oh, directory / file user
>rights, etc. has been set correctly!):
>/var/tomcat4/webapps/mywebapp/
>
>Tomcat directory structure to data (upload) files:
>/var/tomcat4/webapps/mywebapp/data/attachements/
>
>In my upload class, i've defined the var "SAVEPATH" which contain's the
>store path as string ... :
>String savePath="../webapps/mywebapp/data/attachements/";
>
>Question 1:
> >From which base directory does tomcat try to access the data dir?
>(/var/tomcat4/bin/../webapps/mywebap/data/attachements/) ??...
>
>Question 2:
>Is my savePath definition just wrong?
>
>What i'm wondering about: with Tomcat 3.2x, the fileupload worked as
>well 
>
>Thx for any answers ...
>
>Regards,
>-martin
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: File Upload Problem when bigger than 0.97 MB

2001-08-08 Thread Pier P. Fumagalli

Kalyan Mitra at [EMAIL PROTECTED] wrote:

> Hi there,
> 
> I am facing problem when uploading file bigger than 0.97MB through
> MultipartPerser the error in log file shows as follows
> 
> Please help if u have any idea.

I don't see any error in the log file you provided...

Pier




RE: File upload using jsp

2001-08-07 Thread TSzacon



At http://www.jspsmart.com/ there is simple and free java class with examples
(jspSmartUpload) wnich allows file uploading

Olo





Re: file upload servlet

2001-04-23 Thread Christoph Kukulies

On Mon, Apr 23, 2001 at 03:31:39PM +0200, Ralph Einfeldt wrote:
> Obviously your file is not processed by the
> JSP engine of tomcat.
> 
> Sorry to ask that, what's the name of the file
> that contains your code ?

upload.html

Yikes! It should be upload.jsp, right? Oh oh. 

> 
> As I'm not using tomcat I can't tell you
> which screws have to be driven to enable 
> or disable jsp parsing on files with a 
> given extension.
> 
> > -Ursprüngliche Nachricht-
> > Von: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> > Gesendet: Montag, 23. April 2001 15:19
> > An: [EMAIL PROTECTED]
> > Betreff: Re: file upload servlet
> > 
> > 
> > On Mon, Apr 23, 2001 at 07:56:40AM +0200, Ralph Einfeldt wrote:
> > > I had a little typo in my mail, the enclosing quotation 
> > > marks where missing for the attribute action.
> > > That's the corrected version:
> > > 
> > > 
> > >> > action="<%= 
> > response.encodeUrl("/servlets/servlet/Upload") %>"
> > > method="post">
> > >  > maxlength="255">
> > > 
> > >   
> > > 
> > 
> > 
> > Hhmm. I took your corrected version and I can swear by the 
> > life of my Grandma
> > (God bless her) that I'm running tomcat as a standalone http server
> > and this is the 'view page source' :
> >  
> >> action="<%= 
> > response.encodeUrl("/servlets/servlet/Upload") %>" 
> > method="post">
> >   
> >  > maxlength="255">  
> > 
> >  
> >   
> > 
> > and I still get
> > " method="post"> 
> > (one more quote, though).
> > 
> > As said in another message of today (to Anne..), inserting the
> > Servletpath directly, works. But that would have worked with 
> > tomcat+apache
> > configuration anyway.
> > 
> > > 
> > > > -Ursprüngliche Nachricht-
> > > > Von: Christoph Kukulies 
> [mailto:[EMAIL PROTECTED]]
> > > Gesendet: Sonntag, 22. April 2001 20:36
> > > An: [EMAIL PROTECTED]
> > > Betreff: Re: file upload servlet
> > > 
> > > 
> > >  > >  response.encodeUrl("/servlets/servlet/Upload")
> > > %>
> > > method="post">
> > > 
> > > 
> > > 
> > > 
> 
> -- 
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]

-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-23 Thread Christoph Kukulies

On Mon, Apr 23, 2001 at 07:56:40AM +0200, Ralph Einfeldt wrote:
> I had a little typo in my mail, the enclosing quotation 
> marks where missing for the attribute action.
> That's the corrected version:
> 
> 
>action="<%= response.encodeUrl("/servlets/servlet/Upload") %>"
> method="post">
> 
> 
>   
> 


Hhmm. I took your corrected version and I can swear by the life of my Grandma
(God bless her) that I'm running tomcat as a standalone http server
and this is the 'view page source' :
 
  " 
method="post">  
  

 
  

and I still get
" method="post"> 
(one more quote, though).

As said in another message of today (to Anne..), inserting the
Servletpath directly, works. But that would have worked with tomcat+apache
configuration anyway.

> 
> > -Ursprüngliche Nachricht-
> > Von: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> > Gesendet: Sonntag, 22. April 2001 20:36
> > An: [EMAIL PROTECTED]
> > Betreff: Re: file upload servlet
> > 
> > 
> >  >  response.encodeUrl("/servlets/servlet/Upload")
> > %>
> > method="post">
> > 
> > 
> > 
> > 

-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-23 Thread Christoph Kukulies

On Sun, Apr 22, 2001 at 12:40:54PM -0700, Anne Dirkse wrote:
> Christoph --
> You do need the trailing = after <%
> Here's why:
> What you are trying to send from your HTML form is something like this:
> 
>  method="post">
> 
> 
> 

I got your example (with the change to the direct servlet path
rather than the jsp expression) working now. Running tomcat as
a stanalone http/jsp server.

I had to change doGet to doPost btw. in my servlet.

> 
> 
> all the <%= response.encodeURL("/path/to/Servlet") %> is doing is
> rewriting your URL to include session data if cookies are not enabled.

-- 
--Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-23 Thread Christoph Kukulies

On Mon, Apr 23, 2001 at 10:11:08AM +0200, Ralph Einfeldt wrote:
> Look at the source code in the browser.
> 
> If you still see something like <%= response ... %>
> in it you guess is right, otherwise not.

Yes, viewing the page source reveals:


 method="post" >   


   


Now I need to know how to start tomcat as a sole webserver for everything,
html, jsp etc.

> 
> > -Ursprüngliche Nachricht-
> > Von: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> > Gesendet: Montag, 23. April 2001 09:05
> > An: [EMAIL PROTECTED]
> > Betreff: Re: file upload servlet
> > 
> > 
> > Thinking about it the question came up in me: Shouldn't tomcat
> > process the HTML and the jsp expression? With my configuration
> > (apache+ tomcat), could it be that the apache server handles the
> > HTML and cannot cope with the jsp? And, if the latter is the case,
> > how can I overcome the situation?
> > 

-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Christoph Kukulies

On Sun, Apr 22, 2001 at 12:40:54PM -0700, Anne Dirkse wrote:
> Christoph --
> You do need the trailing = after <%
> Here's why:
> What you are trying to send from your HTML form is something like this:
> 
>  method="post">
> 
> 
> 
> 
> The <%= %> is a jsp Expression, which means that the value of whatever
> is in it will be converted to a String and then printed out. Since this
> is done before the HTML is processed, what you get is something like in
> the above example.

Thinking about it the question came up in me: Shouldn't tomcat
process the HTML and the jsp expression? With my configuration
(apache+ tomcat), could it be that the apache server handles the
HTML and cannot cope with the jsp? And, if the latter is the case,
how can I overcome the situation?

> As you have it below, with <% %>, you are not ever actually including
> the value of your encoded URL into your form.
> It's just a scriptlet, which will actually encode your URL, but to no
> avail, since it has no explicit String conversion or printout
> capabilities and thus won't be a part of your form.
> 
> all the <%= response.encodeURL("/path/to/Servlet") %> is doing is
> rewriting your URL to include session data if cookies are not enabled.
> For a first shot at it, you might want to consider just building a set
> of tags like I included above and making sure that works (make sure you
> have cookies enabled, though!) After you have that working, it might be
> a lot easier to get your session encoding working, conceptually. 
> 
> What the leftover method="post"> signals to me is that somewhere you are
> closing the form tag before this part of it, i.e., that the browser
> encounters a > before it encounters method="post"> and thus assumes that
> the form tag has been completed and that method="post"> is regular text
> to be printed to the browser window.
> 
> Hope that helps,
> Anne
> 
-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Anne Dirkse

Christoph --
You do need the trailing = after <%
Here's why:
What you are trying to send from your HTML form is something like this:






The <%= %> is a jsp Expression, which means that the value of whatever
is in it will be converted to a String and then printed out. Since this
is done before the HTML is processed, what you get is something like in
the above example.
As you have it below, with <% %>, you are not ever actually including
the value of your encoded URL into your form.
It's just a scriptlet, which will actually encode your URL, but to no
avail, since it has no explicit String conversion or printout
capabilities and thus won't be a part of your form.

all the <%= response.encodeURL("/path/to/Servlet") %> is doing is
rewriting your URL to include session data if cookies are not enabled.
For a first shot at it, you might want to consider just building a set
of tags like I included above and making sure that works (make sure you
have cookies enabled, though!) After you have that working, it might be
a lot easier to get your session encoding working, conceptually. 

What the leftover method="post"> signals to me is that somewhere you are
closing the form tag before this part of it, i.e., that the browser
encounters a > before it encounters method="post"> and thus assumes that
the form tag has been completed and that method="post"> is regular text
to be printed to the browser window.

Hope that helps,
Anne

Christoph Kukulies wrote:
> 
> On Sun, Apr 22, 2001 at 11:05:44AM -0700, Anne Dirkse wrote:
> > My guess is that you have an extra > somewhere (or that you missed the <
> > at action=<%=)
> 
> The trailing = looks like being added by the mailer.
> 
> It seems to me that I'm missing something more essential. I'm running
> tomcat 3.2 beta. The (jsp) examples all seem to work.
> 
> Even written like this:
> 
>   response.encodeUrl("/servlets/servlet/Upload")
> %>
> method="post">
> 
> 
> 
> 
> 
> doesn't change the picture.
> 
> >
> > Anne
> >
> > Christoph Kukulies wrote:
> > >
> > > On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> > > > For a pure HTML solution you need two things:
> > > >
> > > > a form with at least one file input tag:
> > > >
> > > >  > > > response.encodeUrl("'path-to-your-servlet'") %> method="post">
> > > > 
> > > > 
> > >
> > > This is looking very elegant to me. I tried it but I'm getting
> > >
> > > method="post">
> > >
> > > at the beginning of the page when it appears in the browser.
> > >
> > > Is there a typo (or some mail agent added something, like a '=' sign?)
> > > or am I missing something more severe?
> > >
> > > --
> > > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> 
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Rhett Savage

i'm a little surprised to see the action of this form wrapped by
response.encodeUrl() - is that in fact the ordinary way to do
business? i'm aware of the reasons for doing this in ordinary hrefs,
but i'd wondered if it would be necessary in a  action...?

rhett

On Sun, 22 Apr 2001, Christoph Kukulies wrote:

> On Sun, Apr 22, 2001 at 11:05:44AM -0700, Anne Dirkse wrote:
> > My guess is that you have an extra > somewhere (or that you missed the <
> > at action=<%=)
>
> The trailing = looks like being added by the mailer.
>
> It seems to me that I'm missing something more essential. I'm running
> tomcat 3.2 beta. The (jsp) examples all seem to work.
>
> Even written like this:
> 
>   response.encodeUrl("/servlets/servlet/Upload")
> %>
> method="post">
> 
> 
> 
> 
>
> doesn't change the picture.
>
> >
> > Anne
> >
> > Christoph Kukulies wrote:
> > >
> > > On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> > > > For a pure HTML solution you need two things:
> > > >
> > > > a form with at least one file input tag:
> > > >
> > > >  > > > response.encodeUrl("'path-to-your-servlet'") %> method="post">
> > > > 
> > > > 
> > >
> > > This is looking very elegant to me. I tried it but I'm getting
> > >
> > > method="post">
> > >
> > > at the beginning of the page when it appears in the browser.
> > >
> > > Is there a typo (or some mail agent added something, like a '=' sign?)
> > > or am I missing something more severe?
> > >
> > > --
> > > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
>
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
>




Re: file upload servlet

2001-04-22 Thread Christoph Kukulies

On Sun, Apr 22, 2001 at 11:05:44AM -0700, Anne Dirkse wrote:
> My guess is that you have an extra > somewhere (or that you missed the <
> at action=<%=)

The trailing = looks like being added by the mailer.

It seems to me that I'm missing something more essential. I'm running
tomcat 3.2 beta. The (jsp) examples all seem to work.

Even written like this:


method="post">





doesn't change the picture.

> 
> Anne
> 
> Christoph Kukulies wrote:
> > 
> > On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> > > For a pure HTML solution you need two things:
> > >
> > > a form with at least one file input tag:
> > >
> > >  > > response.encodeUrl("'path-to-your-servlet'") %> method="post">
> > > 
> > > 
> > 
> > This is looking very elegant to me. I tried it but I'm getting
> > 
> > method="post">
> > 
> > at the beginning of the page when it appears in the browser.
> > 
> > Is there a typo (or some mail agent added something, like a '=' sign?)
> > or am I missing something more severe?
> > 
> > --
> > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]

-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Anne Dirkse

My guess is that you have an extra > somewhere (or that you missed the <
at action=<%=)

Anne

Christoph Kukulies wrote:
> 
> On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> > For a pure HTML solution you need two things:
> >
> > a form with at least one file input tag:
> >
> >  > response.encodeUrl("'path-to-your-servlet'") %> method="post">
> > 
> > 
> 
> This is looking very elegant to me. I tried it but I'm getting
> 
> method="post">
> 
> at the beginning of the page when it appears in the browser.
> 
> Is there a typo (or some mail agent added something, like a '=' sign?)
> or am I missing something more severe?
> 
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Christoph Kukulies

On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> For a pure HTML solution you need two things:
> 
> a form with at least one file input tag:
> 
>  response.encodeUrl("'path-to-your-servlet'") %> method="post">
> 
> 

This is looking very elegant to me. I tried it but I'm getting 

method="post"> 

at the beginning of the page when it appears in the browser.

Is there a typo (or some mail agent added something, like a '=' sign?)
or am I missing something more severe?

-- 
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



RE: file upload servlet

2001-04-20 Thread Robert Stehwien


> Is there an example somewhere for a servlet that allows for uploading
> and processing a file.
>

Check out http://www.servlets.com/cos/.  There is a package that helps you
with multipart posts and has some nice documentation and samples.

> Scenario: client (browser side) has edited a file with some information
> or some kind of excel or Word document and need to get that processed.
>
> The idea is to simply drag and drop the document into the broswer window
> and upload it to the server fopr processing.
> If that's too complicated (e.g. requiring swing or something)
> it would be sufficient if the client could be advised to
> open some kind of file selector or browser to select the file to
> be uploaded
> and send it upstream.
>
> What requisites would be required for this?
>
>
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
>
>




RE: RE: RE: file upload servlet

2001-04-20 Thread Wong, Connie

Thanks Travis,
Connie

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 1:36 PM
> To:   [EMAIL PROTECTED]
> Subject:      RE: RE: RE: file upload servlet
> 
> Using the oreilly package, you would do the following on the form submit
> page:
> 
> String filepath = "foodir";
> com.oreilly.servlet.MultipartRequest multi = new
> com.oreilly.servlet.MultipartRequest(request, filepath, 500);
> 
> Enumeration files = multi.getFileNames();
> while (files.hasMoreElements()) {
>   String name = (String)files.nextElement();
>   String filename = multi.getFilesystemName(name);
>   if(filename != null){
>   String content_type = multi.getContentType(name);
>   File f = multi.getFile(name);
>   // now you have the actual file, so you can get some some more info out
> of that
>   // and put in a database or something to keep track of it.
> }
> 
> Simple as that.  the files will be saved to filepath.
> 
> Travis
> 
> 
>  Original Message 
> From: "Wong, Connie" <[EMAIL PROTECTED]>
> Sent: 2001-04-20 11:05:04.0
> To: [EMAIL PROTECTED]
> Subject: RE: RE: file upload servlet
> 
> Hi Travis,
> 
> I'm interest to know how to do it. Would you please post a sample?
> 
> Thanks,
> Connie
> 
> > -Original Message-----
> > From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > Sent:   Friday, April 20, 2001 11:47 AM
> > To: [EMAIL PROTECTED]
> > Subject:RE: RE: file upload servlet
> > 
> > Use input type="file" for file uploads.  Then to process them, you can
> use
> > the oreilly servlets package at www.servlets.com.  If you need a sample
> > let me know.
> > 
> > Travis
> > 
> >  Original Message 
> > From: Jim Alemany <[EMAIL PROTECTED]>
> > Sent: 2001-04-20 09:31:55.0
> > To: [EMAIL PROTECTED]
> > Subject: RE: file upload servlet
> > 
> > jspsmart upload. Its a bean. works nicely.
> > 
> > Found at www.jspsmart.com (its a free bean too).
> > 
> > -Original Message-
> > From: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 20, 2001 11:18 AM
> > To: [EMAIL PROTECTED]
> > Subject: file upload servlet
> > 
> > 
> > 
> > Is there an example somewhere for a servlet that allows for uploading
> > and processing a file.
> > 
> > Scenario: client (browser side) has edited a file with some information
> > or some kind of excel or Word document and need to get that processed.
> > 
> > The idea is to simply drag and drop the document into the broswer window
> > and upload it to the server fopr processing.
> > If that's too complicated (e.g. requiring swing or something)
> > it would be sufficient if the client could be advised to
> > open some kind of file selector or browser to select the file to be
> > uploaded
> > and send it upstream.
> > 
> > What requisites would be required for this?
> > 
> > 
> > --
> > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> > 



RE: RE: RE: file upload servlet

2001-04-20 Thread travis

Using the oreilly package, you would do the following on the form submit page:

String filepath = "foodir";
com.oreilly.servlet.MultipartRequest multi = new 
com.oreilly.servlet.MultipartRequest(request, filepath, 500);

Enumeration files = multi.getFileNames();
while (files.hasMoreElements()) {
  String name = (String)files.nextElement();
  String filename = multi.getFilesystemName(name);
  if(filename != null){
  String content_type = multi.getContentType(name);
  File f = multi.getFile(name);
  // now you have the actual file, so you can get some some more info out of that
  // and put in a database or something to keep track of it.
}

Simple as that.  the files will be saved to filepath.

Travis


 Original Message 
From: "Wong, Connie" <[EMAIL PROTECTED]>
Sent: 2001-04-20 11:05:04.0
To: [EMAIL PROTECTED]
Subject: RE: RE: file upload servlet

Hi Travis,

I'm interest to know how to do it. Would you please post a sample?

Thanks,
Connie

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 11:47 AM
> To:   [EMAIL PROTECTED]
> Subject:  RE: RE: file upload servlet
> 
> Use input type="file" for file uploads.  Then to process them, you can use
> the oreilly servlets package at www.servlets.com.  If you need a sample
> let me know.
> 
> Travis
> 
>  Original Message 
> From: Jim Alemany <[EMAIL PROTECTED]>
> Sent: 2001-04-20 09:31:55.0
> To: [EMAIL PROTECTED]
> Subject: RE: file upload servlet
> 
> jspsmart upload. Its a bean. works nicely.
> 
> Found at www.jspsmart.com (its a free bean too).
> 
> -Original Message-
> From: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: file upload servlet
> 
> 
> 
> Is there an example somewhere for a servlet that allows for uploading
> and processing a file.
> 
> Scenario: client (browser side) has edited a file with some information
> or some kind of excel or Word document and need to get that processed.
> 
> The idea is to simply drag and drop the document into the broswer window
> and upload it to the server fopr processing.
> If that's too complicated (e.g. requiring swing or something)
> it would be sufficient if the client could be advised to
> open some kind of file selector or browser to select the file to be
> uploaded
> and send it upstream.
> 
> What requisites would be required for this?
> 
> 
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> 




RE: RE: file upload servlet

2001-04-20 Thread Wong, Connie

Hi Travis,

I'm interest to know how to do it. Would you please post a sample?

Thanks,
Connie

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 11:47 AM
> To:   [EMAIL PROTECTED]
> Subject:  RE: RE: file upload servlet
> 
> Use input type="file" for file uploads.  Then to process them, you can use
> the oreilly servlets package at www.servlets.com.  If you need a sample
> let me know.
> 
> Travis
> 
>  Original Message 
> From: Jim Alemany <[EMAIL PROTECTED]>
> Sent: 2001-04-20 09:31:55.0
> To: [EMAIL PROTECTED]
> Subject: RE: file upload servlet
> 
> jspsmart upload. Its a bean. works nicely.
> 
> Found at www.jspsmart.com (its a free bean too).
> 
> -Original Message-
> From: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: file upload servlet
> 
> 
> 
> Is there an example somewhere for a servlet that allows for uploading
> and processing a file.
> 
> Scenario: client (browser side) has edited a file with some information
> or some kind of excel or Word document and need to get that processed.
> 
> The idea is to simply drag and drop the document into the broswer window
> and upload it to the server fopr processing.
> If that's too complicated (e.g. requiring swing or something)
> it would be sufficient if the client could be advised to
> open some kind of file selector or browser to select the file to be
> uploaded
> and send it upstream.
> 
> What requisites would be required for this?
> 
> 
> --
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> 



RE: file upload servlet

2001-04-20 Thread Jim Alemany

jspsmart upload. Its a bean. works nicely.

Found at www.jspsmart.com (its a free bean too).

-Original Message-
From: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 11:18 AM
To: [EMAIL PROTECTED]
Subject: file upload servlet



Is there an example somewhere for a servlet that allows for uploading
and processing a file.

Scenario: client (browser side) has edited a file with some information
or some kind of excel or Word document and need to get that processed.

The idea is to simply drag and drop the document into the broswer window
and upload it to the server fopr processing.
If that's too complicated (e.g. requiring swing or something)
it would be sufficient if the client could be advised to
open some kind of file selector or browser to select the file to be uploaded
and send it upstream.

What requisites would be required for this?


--
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]




RE: RE: file upload servlet

2001-04-20 Thread travis

Use input type="file" for file uploads.  Then to process them, you can use the oreilly 
servlets package at www.servlets.com.  If you need a sample let me know.

Travis

 Original Message 
From: Jim Alemany <[EMAIL PROTECTED]>
Sent: 2001-04-20 09:31:55.0
To: [EMAIL PROTECTED]
Subject: RE: file upload servlet

jspsmart upload. Its a bean. works nicely.

Found at www.jspsmart.com (its a free bean too).

-Original Message-
From: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 11:18 AM
To: [EMAIL PROTECTED]
Subject: file upload servlet



Is there an example somewhere for a servlet that allows for uploading
and processing a file.

Scenario: client (browser side) has edited a file with some information
or some kind of excel or Word document and need to get that processed.

The idea is to simply drag and drop the document into the broswer window
and upload it to the server fopr processing.
If that's too complicated (e.g. requiring swing or something)
it would be sufficient if the client could be advised to
open some kind of file selector or browser to select the file to be uploaded
and send it upstream.

What requisites would be required for this?


--
Chris Christoph P. U. Kukulies [EMAIL PROTECTED]





RE: File Upload

2001-03-28 Thread Suresh Krishna M (RBIN/DBA-JOT)

hi man  goto www.servlets.com / www.servlets.com in that u will have
Oreilley's servlet package for download.get bak if u have any problem.





> -Original Message-
> From: Valeriy Molyakov [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 12:10 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: File Upload
> 
> What is the url of this package ?
> 
> - Original Message - 
> From: "Fabien Modoux" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 8:41 PM
> Subject: File Upload
> 
> 
> > Hello,
> > 
> > I am using Tomcat with Apache on Linux. I am using the OReilly
> > package to upload files through a servlet, but it only works
> > for text files. I found several messages in the archive about
> > that, but haven't been able to find a good solution. Does
> > anyone know how to go around or fix this problem.
> > 
> > Thanks,
> > 
> > -Fabien



Re: File Upload

2001-03-28 Thread NSB)Hiroshi Kasamatsu
Hi,Valeriy


I found it here.

http://www.servlets.com/resources/com.oreilly.servlet/





Valeriy Molyakov wrote:

> Hi!
> Where I can found class MultipartRequest ?
>
> - Original Message -
> From: "NSB)Hiroshi Kasamatsu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 10:12 AM
> Subject: Re: File Upload
>
> > Hi,Fabien
> >
> > MultipartRequest works very fine.
> > You may use file stream wrongly.
> >
> > My coding is as follows. I make it in any file because of byte
> > input-output.
> >
> > MultipartRequest multi=new MultipartRequest(req,".");
> >
> >   Enumeration params=multi.getParameterNames();
> >   Enumeration files=multi.getFileNames();
> >
> >
> >   File f=null;
> >
> >String f_name=null;
> >while(files.hasMoreElements()){
> >f_name=(String)files.nextElement();
> > f_name=f_name.trim();
> >
> > st_type=multi.getContentType(f_name);
> > f=multi.getFile(f_name);
> >}
> >
> > if(f!=null){
> >FileInputStream fis=new FileInputStream(f);
> >
> >FileOutputStream fos=new FileOutputStream(fname);
> >int b;
> >while((b=fis.read())!=-1){
> > fos.write((byte)b);
> > }
> >fis.close();fos.close();
> > }
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Fabien Modoux wrote:
> >
> > > Hello,
> > >
> > > I am using Tomcat with Apache on Linux. I am using the OReilly
> > > package to upload files through a servlet, but it only works
> > > for text files. I found several messages in the archive about
> > > that, but haven't been able to find a good solution. Does
> > > anyone know how to go around or fix this problem.
> > >
> > > Thanks,
> > >
> > > -Fabien


RE: File Upload

2001-03-27 Thread Etienne Baert \(SPS Europe\)
at http://www.servlets.com/resources/com.oreilly.servlet/index.html

Etienne

-Original Message-
From: Valeriy Molyakov [mailto:[EMAIL PROTECTED]]
Sent: mercredi 28 mars 2001 9:53
To: [EMAIL PROTECTED]
Subject: Re: File Upload


Hi!
Where I can found class MultipartRequest ?

- Original Message - 
From: "NSB)Hiroshi Kasamatsu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 10:12 AM
Subject: Re: File Upload


> Hi,Fabien
> 
> MultipartRequest works very fine.
> You may use file stream wrongly.
> 
> My coding is as follows. I make it in any file because of byte
> input-output.
> 
> MultipartRequest multi=new MultipartRequest(req,".");
> 
>   Enumeration params=multi.getParameterNames();
>   Enumeration files=multi.getFileNames();
> 
> 
>   File f=null;
> 
>String f_name=null;
>while(files.hasMoreElements()){
>f_name=(String)files.nextElement();
> f_name=f_name.trim();
> 
> st_type=multi.getContentType(f_name);
> f=multi.getFile(f_name);
>}
> 
> if(f!=null){
>FileInputStream fis=new FileInputStream(f);
> 
>FileOutputStream fos=new FileOutputStream(fname);
>int b;
>while((b=fis.read())!=-1){
> fos.write((byte)b);
> }
>fis.close();fos.close();
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Fabien Modoux wrote:
> 
> > Hello,
> >
> > I am using Tomcat with Apache on Linux. I am using the OReilly
> > package to upload files through a servlet, but it only works
> > for text files. I found several messages in the archive about
> > that, but haven't been able to find a good solution. Does
> > anyone know how to go around or fix this problem.
> >
> > Thanks,
> >
> > -Fabien


Re: File Upload

2001-03-27 Thread Valeriy Molyakov
Hi!
Where I can found class MultipartRequest ?

- Original Message - 
From: "NSB)Hiroshi Kasamatsu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 10:12 AM
Subject: Re: File Upload


> Hi,Fabien
> 
> MultipartRequest works very fine.
> You may use file stream wrongly.
> 
> My coding is as follows. I make it in any file because of byte
> input-output.
> 
> MultipartRequest multi=new MultipartRequest(req,".");
> 
>   Enumeration params=multi.getParameterNames();
>   Enumeration files=multi.getFileNames();
> 
> 
>   File f=null;
> 
>String f_name=null;
>while(files.hasMoreElements()){
>f_name=(String)files.nextElement();
> f_name=f_name.trim();
> 
> st_type=multi.getContentType(f_name);
> f=multi.getFile(f_name);
>}
> 
> if(f!=null){
>FileInputStream fis=new FileInputStream(f);
> 
>FileOutputStream fos=new FileOutputStream(fname);
>int b;
>while((b=fis.read())!=-1){
> fos.write((byte)b);
> }
>fis.close();fos.close();
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Fabien Modoux wrote:
> 
> > Hello,
> >
> > I am using Tomcat with Apache on Linux. I am using the OReilly
> > package to upload files through a servlet, but it only works
> > for text files. I found several messages in the archive about
> > that, but haven't been able to find a good solution. Does
> > anyone know how to go around or fix this problem.
> >
> > Thanks,
> >
> > -Fabien


Re: File Upload

2001-03-27 Thread NSB)Hiroshi Kasamatsu
Hi,Fabien

MultipartRequest works very fine.
You may use file stream wrongly.

My coding is as follows. I make it in any file because of byte
input-output.

MultipartRequest multi=new MultipartRequest(req,".");

  Enumeration params=multi.getParameterNames();
  Enumeration files=multi.getFileNames();


  File f=null;

   String f_name=null;
   while(files.hasMoreElements()){
   f_name=(String)files.nextElement();
f_name=f_name.trim();

st_type=multi.getContentType(f_name);
f=multi.getFile(f_name);
   }

if(f!=null){
   FileInputStream fis=new FileInputStream(f);

   FileOutputStream fos=new FileOutputStream(fname);
   int b;
   while((b=fis.read())!=-1){
fos.write((byte)b);
}
   fis.close();fos.close();
}









Fabien Modoux wrote:

> Hello,
>
> I am using Tomcat with Apache on Linux. I am using the OReilly
> package to upload files through a servlet, but it only works
> for text files. I found several messages in the archive about
> that, but haven't been able to find a good solution. Does
> anyone know how to go around or fix this problem.
>
> Thanks,
>
> -Fabien


Re: File Upload

2001-03-27 Thread Valeriy Molyakov

What is the url of this package ?

- Original Message - 
From: "Fabien Modoux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 8:41 PM
Subject: File Upload


> Hello,
> 
> I am using Tomcat with Apache on Linux. I am using the OReilly
> package to upload files through a servlet, but it only works
> for text files. I found several messages in the archive about
> that, but haven't been able to find a good solution. Does
> anyone know how to go around or fix this problem.
> 
> Thanks,
> 
> -Fabien




Re: File Upload

2001-03-27 Thread Hunter Hillegas
Title: Re: File Upload



It has problems with older versions of the Apj13 protocol connecting with Apache... Use either Apj12 or mod_jk from CVS...

Hunter

From: Simon Chatfield <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Tue, 27 Mar 2001 10:59:38 -0700
To: [EMAIL PROTECTED]
Subject: Re: File Upload


I'm using that package as well, but have never had the problem you're describing. All datatypes work fine. 
 

Fabien Modoux wrote: 
Hello, 

I am using Tomcat with Apache on Linux. I am using the OReilly 
package to upload files through a servlet, but it only works 
for text files. I found several messages in the archive about 
that, but haven't been able to find a good solution. Does 
anyone know how to go around or fix this problem. 

Thanks, 

-Fabien
-- 
Simon Chatfield
VP, Software Development
Inteflux Inc.  







Re: File Upload

2001-03-27 Thread Corey A. Johnson

i 2nd that.

no problem at all.  with binary and ascii data.

post a code snippet.

Simon Chatfield wrote:

> I'm using that package as well, but have never had the problem you're
> describing. All datatypes work fine.
>
>
> Fabien Modoux wrote:
>
>> Hello,
>>
>> I am using Tomcat with Apache on Linux. I am using the OReilly
>> package to upload files through a servlet, but it only works
>> for text files. I found several messages in the archive about
>> that, but haven't been able to find a good solution. Does
>> anyone know how to go around or fix this problem.
>>
>> Thanks,
>>
>> -Fabien
>
> --
> Simon Chatfield
> VP, Software Development
> Inteflux Inc.
>
>

--
Corey A. Johnson
Creative Network Innovations
http://www.cniweb.net/
1-800-CNi-5547 ** 1-321-259-1984





Re: File Upload

2001-03-27 Thread Simon Chatfield


I'm using that package as well, but have never had the problem you're describing.
All datatypes work fine.
 
Fabien Modoux wrote:
Hello,
I am using Tomcat with Apache on Linux. I am using the OReilly
package to upload files through a servlet, but it only works
for text files. I found several messages in the archive about
that, but haven't been able to find a good solution. Does
anyone know how to go around or fix this problem.
Thanks,
-Fabien

-- 
Simon Chatfield
VP, Software Development
Inteflux Inc.
 



Re: file upload issues

2001-01-20 Thread Mike Tinnes

Thanks Travis, that helped ;), but it's still not working 100%. The 
save-as dialog pops up and allows me to save to disk, but if I choose to 
open instread of save it hangs. The browser indicates it's busy, but the 
image is never displayed. This only applies to IE, Netscape 6 doesn't 
prompt to save at all. I'll include the complete code below.

Thanks again, Mike


public class FileDownload extends java.lang.Object {
  
   private PageContext pageContext;
   private HttpServletResponse response;
  
   /** Creates new FileDownload */
   public FileDownload() {
   response = null;
   }
  
   public void initialize(PageContext pageContext, HttpServletResponse 
response) {
   this.response = response;
   this.pageContext = pageContext;
   }
  
   public void downloadFile(String filePath, String mimeType, String 
promptName) {
  
   ServletResponse res = pageContext.getResponse();
  
   System.out.println("PATH: " + filePath);
  
   File f = new File(filePath);
   InputStream in = null;
   try {
   in = new BufferedInputStream(new FileInputStream(f));
   } catch (FileNotFoundException e) {
   System.out.println("Unable to open " + filePath + " for 
download!");
   return;
   }
  
   response.setContentType("image/gif");
   response.setContentLength((int) f.length());
   response.setHeader("Content-disposition","attachment; filename=" 
+ promptName);
   OutputStream out = null;
   try {
   out = res.getOutputStream();
   } catch (IOException e) {
   System.out.println("Error opening output stream in 
FileDownload!");
   return;
   }
   int  sentsize = 0;
   int  readlen;
   byte buffer[] = new byte[256];
  
   try {
   while ((readlen = in.read(buffer)) != -1 ) {
   out.write(buffer, 0, readlen);
   sentsize += readlen;
   }
   } catch (IOException e) {
   System.out.println("Error transfering file in FileDownload!");
   return;
   }
   // Success ! Close streams.
   try {
   out.flush();
   out.close();
   in.close();
   } catch (IOException e) {
   }
   }
}



[EMAIL PROTECTED] wrote:

> You spelt attachment wrong.  You have attachement.
> 
> Travis
> 
>  Original Message 
> From: Mike Tinnes <[EMAIL PROTECTED]>
> Sent: 2001-01-19 23:45:17.0
> To: [EMAIL PROTECTED]
> Subject: file upload issues
> 
> Hello everyone. I need a jsp which downloads a serverside image to a client and 
>instead of simply displaying the image in the browser, I'd like it to popup a save-as 
>dialog. I've read a few posts on a similar subject, but I can't get anything to work 
>the way I need it to. I've tried the following in my response code...
> 
> response.setContentType("image/gif");
> response.setContentLength((int) f.length());
> response.setHeader("Content-disposition","attachement; filename=test.gif");
> 
> This displays the image in the browser as usual, but does use 'test.gif' for saving. 
>Do I need some special mime type? 
> 
> TIA, Mike
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: file upload issues

2001-01-20 Thread travis

You spelt attachment wrong.  You have attachement.

Travis

 Original Message 
From: Mike Tinnes <[EMAIL PROTECTED]>
Sent: 2001-01-19 23:45:17.0
To: [EMAIL PROTECTED]
Subject: file upload issues

Hello everyone. I need a jsp which downloads a serverside image to a client and 
instead of simply displaying the image in the browser, I'd like it to popup a save-as 
dialog. I've read a few posts on a similar subject, but I can't get anything to work 
the way I need it to. I've tried the following in my response code...

response.setContentType("image/gif");
response.setContentLength((int) f.length());
response.setHeader("Content-disposition","attachement; filename=test.gif");

This displays the image in the browser as usual, but does use 'test.gif' for saving. 
Do I need some special mime type? 

TIA, Mike


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: file upload issues

2001-01-20 Thread William Brogden



Mike Tinnes wrote:
> 
> Hello everyone. I need a jsp which downloads a serverside image to a client and 
>instead of simply displaying the image in the browser, I'd like it to popup a save-as 
>dialog. I've read a few posts on a similar subject, but I can't get anything to work 
>the way I need it to. I've tried the following in my response code...
> 
> response.setContentType("image/gif");
> response.setContentLength((int) f.length());
> response.setHeader("Content-disposition","attachement; filename=test.gif");
> 
> This displays the image in the browser as usual, but does use 'test.gif' for saving. 
>Do I need some special mime type?
> 
> TIA, Mike
> 

I think you need to change the content type - once a browser sees
"image/gif" it is going to display.
Try  response.setContentType("application/octet-stream");
so the browser won't jump to conclusions.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: file upload servlet

2000-12-29 Thread Joe Laffey

>
> I think that you can not mix parameters and file when you use
> MultipartRequest ( from Jason') to handle multipart/form-data.
> Regards,

I have no problem mixing them. Be sure you have
encoding="multipart/form-data" in your FORM tag.

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: file upload servlet

2000-12-29 Thread Tim Cronin

Yes I think your right I had a parameter additional to
the file and got an exception. when I put it as part
of the query string the problem disappeared.

-Original Message-
From: Jose Euclides da Silva Junior - DIGR.O
[mailto:[EMAIL PROTECTED]]
Sent: Friday, December 29, 2000 7:26 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RES: file upload servlet


-BEGIN PGP SIGNED MESSAGE-

I think that you can not mix parameters and file when you use
MultipartRequest ( from Jason') to handle multipart/form-data.
Regards,

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


- -Mensagem original-
De: Tim Cronin [SMTP:[EMAIL PROTECTED]]
Enviada em: Quarta-feira, 27 de Dezembro de 2000 22:50
Para:   '[EMAIL PROTECTED]'
Assunto:        RE: file upload servlet

I'm using it on nt4 sun JDK 1.3, tomcat 3.1, apache 1.3.12
and on RH linux 6.2 sun JDK 1.3, tomcat 3.1, apache 1.3.12

I'm waiting till all the bleeding edgers debug 3.2

Initially I had some funky behavior when I ccped from the upload
examples, but I rewrote it from scratch and it seems to work ok.


- -Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 6:40 PM
To: [EMAIL PROTECTED]
Subject: RE: file upload servlet




I am very surprised. I tried the same version.

Here is the code I am using. As you can see, (or somebody can see), this is
from
upload.war (the sample came with the multirequest class) with some
modifications.

If everything works ok, I should be able to see all the parameters and files
listed. However, it only worked for text files. For binary files, results
vary
from server error to exception in the MultiPartRequest constrcutor. The only
difference I could find between your code and mine is mine is in a servlet's
doPost() function?

Now I am really confused. Help!

Is it related to tomcat somehow. I am using tomcat 3.2.1 with apache 1.3.14
on
WinNT4.0.

Yanbin




  try {
MultipartRequest multi =
  new MultipartRequest(req, "D:/upload");

writer.println("Params:");
Enumeration params = multi.getParameterNames();
while (params.hasMoreElements()) {
  String name = (String)params.nextElement();
  String value = multi.getParameter(name);
  writer.println("" + name + " = " + value + "");
}
writer.println();

writer.println("Files:");
Enumeration files = multi.getFileNames();
while (files.hasMoreElements()) {
  String name = (String)files.nextElement();
  String filename = multi.getFilesystemName(name);
  String type = multi.getContentType(name);
  File f = multi.getFile(name);
  writer.println("" + "name: " + name + "");
  writer.println("" + "filename: " + filename + "");
  writer.println("" + "type: " + type + "");
  if (f != null) {
writer.println("" + "f.toString(): " + f.toString() +
"");
writer.println("" + "f.getName(): " + f.getName() +
"");
writer.println("" + "f.exists(): " + f.exists() +
"");
writer.println("" + "f.length(): " + f.length() +
"");
writer.println("");
  }
}
  }
  catch (IOException lEx) {
this.getServletContext().log("error reading or saving file" +
lEx,
lEx);
  }
  catch (Exception e)
  {
   this.getServletContext().log("caught un-known exception" + e,
e);
  }



|+>
||  Tim Cronin|
||  <[EMAIL PROTECTED]|
||  eClub.com>|
|||
||  12/27/00 06:47 PM |
||  Please respond to |
||  tomcat-user       |
|||
|+>
 
>---
|
  |
|
  |   To: "'[EMAIL PROTECTED]'"
|
  |   <[EMAIL PROTECTED]>
|
  |   cc: (bcc: Yanbin Ma/SYS/NYTIMES)
|
  |   Subject: RE: file upload servlet
|
 
>---
|




I was able to upload tex

RE: file upload servlet

2000-12-27 Thread Tim Cronin

I'm using it on nt4 sun JDK 1.3, tomcat 3.1, apache 1.3.12
and on RH linux 6.2 sun JDK 1.3, tomcat 3.1, apache 1.3.12

I'm waiting till all the bleeding edgers debug 3.2

Initially I had some funky behavior when I ccped from the upload
examples, but I rewrote it from scratch and it seems to work ok.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 6:40 PM
To: [EMAIL PROTECTED]
Subject: RE: file upload servlet




I am very surprised. I tried the same version.

Here is the code I am using. As you can see, (or somebody can see), this is
from
upload.war (the sample came with the multirequest class) with some
modifications.

If everything works ok, I should be able to see all the parameters and files
listed. However, it only worked for text files. For binary files, results
vary
from server error to exception in the MultiPartRequest constrcutor. The only
difference I could find between your code and mine is mine is in a servlet's
doPost() function?

Now I am really confused. Help!

Is it related to tomcat somehow. I am using tomcat 3.2.1 with apache 1.3.14
on
WinNT4.0.

Yanbin




  try {
MultipartRequest multi =
  new MultipartRequest(req, "D:/upload");

writer.println("Params:");
Enumeration params = multi.getParameterNames();
while (params.hasMoreElements()) {
  String name = (String)params.nextElement();
  String value = multi.getParameter(name);
  writer.println("" + name + " = " + value + "");
}
writer.println();

writer.println("Files:");
Enumeration files = multi.getFileNames();
while (files.hasMoreElements()) {
  String name = (String)files.nextElement();
  String filename = multi.getFilesystemName(name);
  String type = multi.getContentType(name);
  File f = multi.getFile(name);
  writer.println("" + "name: " + name + "");
  writer.println("" + "filename: " + filename + "");
  writer.println("" + "type: " + type + "");
  if (f != null) {
writer.println("" + "f.toString(): " + f.toString() +
"");
writer.println("" + "f.getName(): " + f.getName() +
"");
writer.println("" + "f.exists(): " + f.exists() +
"");
writer.println("" + "f.length(): " + f.length() +
"");
writer.println("");
  }
}
  }
  catch (IOException lEx) {
this.getServletContext().log("error reading or saving file" +
lEx,
lEx);
  }
  catch (Exception e)
  {
   this.getServletContext().log("caught un-known exception" + e,
e);
  }



|+>
||  Tim Cronin|
||  <[EMAIL PROTECTED]|
||  eClub.com>|
|||
||  12/27/00 06:47 PM |
||  Please respond to |
||  tomcat-user   |
|    |    |
|+>
 
>---
|
  |
|
  |   To: "'[EMAIL PROTECTED]'"
|
  |   <[EMAIL PROTECTED]>
|
  |   cc: (bcc: Yanbin Ma/SYS/NYTIMES)
|
  |   Subject: RE: file upload servlet
|
 
>---
|




I was able to upload text, image, exe files, and other binaries with oreily
package.
I am using the nov 20 2000 version

here's the code from my jsp file

private String processRequest
(
  HttpServletRequest request
)
{
  String cType = request.getContentType();

  if (cType != null &&
cType.toLowerCase().startsWith("multipart/form-data"))
  {
try
{
  String appPath = getPath(request);
  MultipartRequest multi = new MultipartRequest(request, appPath);
  String submit = multi.getParameter(SUBMIT_UPLOAD_NAME);
  if(submit != null && (submit.equals(SUBMIT_UPLOAD_VAL)))
  {
Enumeration files = multi.getFileNames();
if(!files.hasMoreElements())
{
  return("No file was uploaded!");
        }
    else
{
  return("uploaded " +
multi.getFilesystemName((String)files.nextElement()) + " to " + appPath);
}
  }
}
catch(IOException e)
{
  ret

RE: file upload servlet

2000-12-27 Thread mayan



I am very surprised. I tried the same version.

Here is the code I am using. As you can see, (or somebody can see), this is from
upload.war (the sample came with the multirequest class) with some
modifications.

If everything works ok, I should be able to see all the parameters and files
listed. However, it only worked for text files. For binary files, results vary
from server error to exception in the MultiPartRequest constrcutor. The only
difference I could find between your code and mine is mine is in a servlet's
doPost() function?

Now I am really confused. Help!

Is it related to tomcat somehow. I am using tomcat 3.2.1 with apache 1.3.14 on
WinNT4.0.

Yanbin




  try {
MultipartRequest multi =
  new MultipartRequest(req, "D:/upload");

writer.println("Params:");
Enumeration params = multi.getParameterNames();
while (params.hasMoreElements()) {
  String name = (String)params.nextElement();
  String value = multi.getParameter(name);
  writer.println("" + name + " = " + value + "");
}
writer.println();

writer.println("Files:");
Enumeration files = multi.getFileNames();
while (files.hasMoreElements()) {
  String name = (String)files.nextElement();
  String filename = multi.getFilesystemName(name);
  String type = multi.getContentType(name);
  File f = multi.getFile(name);
  writer.println("" + "name: " + name + "");
  writer.println("" + "filename: " + filename + "");
  writer.println("" + "type: " + type + "");
  if (f != null) {
writer.println("" + "f.toString(): " + f.toString() +
"");
writer.println("" + "f.getName(): " + f.getName() + "");
writer.println("" + "f.exists(): " + f.exists() + "");
writer.println("" + "f.length(): " + f.length() + "");
writer.println("");
  }
}
  }
  catch (IOException lEx) {
this.getServletContext().log("error reading or saving file" + lEx,
lEx);
  }
  catch (Exception e)
  {
   this.getServletContext().log("caught un-known exception" + e, e);
  }



|+>
||  Tim Cronin|
||  <[EMAIL PROTECTED]|
||  eClub.com>|
|||
||  12/27/00 06:47 PM |
||  Please respond to |
||  tomcat-user   |
|||
|+>
  >---|
  |       |
  |   To: "'[EMAIL PROTECTED]'"  |
  |   <[EMAIL PROTECTED]>|
  |   cc: (bcc: Yanbin Ma/SYS/NYTIMES)|
  |   Subject: RE: file upload servlet|
  >---|




I was able to upload text, image, exe files, and other binaries with oreily
package.
I am using the nov 20 2000 version

here's the code from my jsp file

private String processRequest
(
  HttpServletRequest request
)
{
  String cType = request.getContentType();

  if (cType != null &&
cType.toLowerCase().startsWith("multipart/form-data"))
  {
try
{
  String appPath = getPath(request);
  MultipartRequest multi = new MultipartRequest(request, appPath);
  String submit = multi.getParameter(SUBMIT_UPLOAD_NAME);
  if(submit != null && (submit.equals(SUBMIT_UPLOAD_VAL)))
  {
Enumeration files = multi.getFileNames();
if(!files.hasMoreElements())
{
  return("No file was uploaded!");
}
        else
{
  return("uploaded " +
multi.getFilesystemName((String)files.nextElement()) + " to " + appPath);
}
  }
}
catch(IOException e)
{
  return(e.getMessage());
}
  }
  return("");
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 5:37 PM
To: [EMAIL PROTECTED]
Subject: RE: file upload servlet




Thank you, Tim.

I tried this one first before I posted the message. 

RE: file upload servlet

2000-12-27 Thread Tim Cronin

I was able to upload text, image, exe files, and other binaries with oreily
package.
I am using the nov 20 2000 version

here's the code from my jsp file

private String processRequest
(
  HttpServletRequest request
)
{
  String cType = request.getContentType();

  if (cType != null &&
cType.toLowerCase().startsWith("multipart/form-data")) 
  {
try
{
  String appPath = getPath(request);
  MultipartRequest multi = new MultipartRequest(request, appPath);
  String submit = multi.getParameter(SUBMIT_UPLOAD_NAME);
  if(submit != null && (submit.equals(SUBMIT_UPLOAD_VAL)))
  {
Enumeration files = multi.getFileNames();
if(!files.hasMoreElements())
{
  return("No file was uploaded!");
}
else
{
  return("uploaded " +
multi.getFilesystemName((String)files.nextElement()) + " to " + appPath);
}
  }
}
catch(IOException e)
{
  return(e.getMessage());
} 
  }
  return("");
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 5:37 PM
To: [EMAIL PROTECTED]
Subject: RE: file upload servlet




Thank you, Tim.

I tried this one first before I posted the message. It worked only for text
files.

I tried two versions. The very first and the very last one.

Did you work with this library before? How did you upload binary files?

Yanbin



|+>
||  Tim Cronin|
||  <[EMAIL PROTECTED]|
||  eClub.com>|
|||
||  12/27/00 06:22 PM |
||  Please respond to |
||  tomcat-user   |
|||
|+>
 
>---
|
  |
|
  |   To: "'[EMAIL PROTECTED]'"
|
  |       <[EMAIL PROTECTED]>
|
  |   cc: (bcc: Yanbin Ma/SYS/NYTIMES)
|
  |   Subject: RE: file upload servlet
|
 
>---
|




they have a good multipart form handler.

http://www.servlets.com/resources/com.oreilly.servlet/

the only draw back is you need to know the path
to store the files at before you parse the multipart request.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 5:15 PM
To: [EMAIL PROTECTED]
Subject: file upload servlet




Hi all,

Does anybody know a servlet utility that can handle binary file upload?

I appreciate any information you can share.

Ma, Yanbin







RE: file upload servlet

2000-12-27 Thread mayan



Thank you, Tim.

I tried this one first before I posted the message. It worked only for text
files.

I tried two versions. The very first and the very last one.

Did you work with this library before? How did you upload binary files?

Yanbin



|+>
||  Tim Cronin|
||  <[EMAIL PROTECTED]|
||  eClub.com>|
|||
||  12/27/00 06:22 PM |
||  Please respond to |
||  tomcat-user   |
|||
|+>
  >---|
  |   |
  |   To: "'[EMAIL PROTECTED]'"  |
  |   <[EMAIL PROTECTED]>|
  |   cc: (bcc: Yanbin Ma/SYS/NYTIMES)        |
  |   Subject: RE: file upload servlet|
  >---|




they have a good multipart form handler.

http://www.servlets.com/resources/com.oreilly.servlet/

the only draw back is you need to know the path
to store the files at before you parse the multipart request.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 27, 2000 5:15 PM
To: [EMAIL PROTECTED]
Subject: file upload servlet




Hi all,

Does anybody know a servlet utility that can handle binary file upload?

I appreciate any information you can share.

Ma, Yanbin








  1   2   >