You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allen Harper <ha...@yahoo.com> on 2002/03/26 03:41:00 UTC

DISREGARD PREV RE: Client Side Authentication with Certificates...HOW?

Please disregard previous email, I had a bad build of tomcat running.
Or at least, I messed up something.  I just reinstalled tomcat, and all
is well.
 
Sorry for waiting bandwidth...I am sure I will have a real problem
soon... more then
 
Allen

-----Original Message-----
From: Allen Harper [mailto:harperaa@yahoo.com] 
Sent: Monday, March 25, 2002 3:52 PM
To: tomcat-user@jakarta.apache.org
Subject: Client Side Authentication with Certificates...HOW?


Hello, I am new to Tomcat.  I am trying to get Client Side
Authentication to work.   Below is a snippet from my server.xml file.
When I set the clientAuth="false", I can connect to the server with SSL
(server side as expected).  But when I set it as shown below
(clientAuth="true"), I get "The page cannot be displayed" error when
going to  <https://localhost:8443> https://localhost:8443   Works fine
with  <http://localhost> http://localhost

I created the keystore and added two trusted CA certificates to it.
But, I can't even get it to pop up with request for client certificates.

Any ideas at all would be appreciated.

Attached are my logs.

-----------------

<Connector className="org.apache.catalina.connector.http.HttpConnector"

port="8443" minProcessors="5" maxProcessors="75"

enableLookups="true"

acceptCount="10" debug="0" scheme="https" secure="true">

<Factory className="org.apache.catalina.net.SSLServerSocketFactory"

clientAuth="true" protocol="TLS"/>

</Connector>

----------------

I have not got to trying to protect a particular resource, figured I
would get it up first.  I have tried to play with web.xml, no luck, I
set it back to default.  If I need to include any other snippets, please
let me know.

allen harper


Re[2]: How to POST very large data to Servlet? (a question about ServletRequest.getInputStream)

Posted by Søren Neigaard <ne...@e-box.dk>.
Hi John

I have no idea if you problem is the same as mine, but I have had
similar problems, and I eventually fixed it by enlarging the heap and
stack memory parameter for the JVM.

As said, I don't know if it will help you, but it did help me :)

/Søren

Tuesday, March 26, 2002, 10:36:40 PM, John wrote:

JR> Note: Repost of Assert failed, buff too small.

JR> We are currently troubleshooting a problem (originally posted last week
JR> 3/20/02) relating to this same issue.  Our application uploads data using an
JR> HTTP POST.  Directly to Tomcat or with HTTP, it works fine.  With HTTPS,
JR> ajp13.java reports "Assert Failed, buff too small", and then the application
JR> produces an exception.  We are using the O'Reilly servlet with our
JR> environment, outlined below.  Anyone with any assistance would be
JR> appreciated.

JR> -----Original Message-----
JR> We are having a problem with Tomcat using an upload servlet to upload
JR> potentially large files (up to 100MB).  The servlet works fine for all file
JR> sizes in the following instances:
JR> http://servername/app/UploadFiles.jsp
JR> http://servername:8080/app/UploadFiles.jsp
JR> but when using https (ie: https://servername/app/UploadFiles.jsp, we get
JR> 'Page Cannot Be Displayed'.  A summary of the error logs is below:

JR> IIS_Redirect.Log
JR> ----------------
JR>  [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (206)]: sending to ajp13
JR> #8192
JR>  [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (258)]: received from ajp13
JR> #3
JR>  [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
JR> jk_ws_service_t::read
JR>  [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
JR> jk_ws_service_t::read

JR>  ... this repeats 1364 times, everytime, before the following: ...

JR>  [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (206)]: sending to ajp13
JR> #8192
JR>  [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (258)]: received from ajp13
JR> #3
JR>  [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
JR> jk_ws_service_t::read
JR>  [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
JR> jk_ws_service_t::read
JR>  [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (460)]:
JR> jk_ws_service_t::read, ReadClient failed

JR> stdout.log
JR> ----------
JR>  Starting service Tomcat-Standalone-(Staging)
JR>  Apache Tomcat/4.0.1
JR>  [Ajp13] bad read: -103
JR>  XXX Assert failed, buff too small

JR> Note: Yes, I have been following the list, and I don't know what causes -103
JR> either, but with the exception of this servlet, our app has been running
JR> great for months, with several dozen -103's a day.  The XXX Assert Failed is
JR> new.

JR> tomcat_log.log
JR> --------------
JR> 2002-03-20 15:34:02 UploadFiles: init
JR> 2002-03-20 15:34:15 jsp: init
JR> 2002-03-20 15:34:15 Ajp13Processor[8009][6] process: invoke
JR> java.net.SocketException: Connection aborted by peer: socket write error
JR>         at java.net.SocketOutputStream.socketWrite(Native Method)
JR>         at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
JR>         at org.apache.ajp.Ajp13.send(Ajp13.java:959)
JR>         at org.apache.ajp.Ajp13.finish(Ajp13.java:808)
JR>         at
JR> org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:192)
JR>         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:373)
JR>         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424)
JR>         at java.lang.Thread.run(Thread.java:484)

JR> Application Log
JR> ---------------
JR> 2002-03-20 15:34:03,253 [Ajp13Processor[8009][6]] DEBUG
JR> com.psc.ams.servlets.PSCUploadFilesByExtension - clearing dir
JR> e:/****/staging\jroth
JR> 2002-03-20 15:34:03,253 [Ajp13Processor[8009][6]] DEBUG
JR> com.psc.ams.servlets.PSCUploadFilesByExtension - attempting to delete file
JR> e:\****\staging\jroth\11MB.txt
JR> 2002-03-20 15:34:15,190 [Ajp13Processor[8009][6]] ERROR
JR> com.psc.ams.servlets.PSCUploadFilesByExtension - Unexpected Exception
JR> occured in PSCUploadFiles.doPost().
JR> java.lang.ArrayIndexOutOfBoundsException
JR>         at java.lang.System.arraycopy(Native Method)
JR>         at org.apache.ajp.Ajp13Packet.getBytes(Ajp13Packet.java:459)
JR>         at org.apache.ajp.Ajp13.refillReadBuffer(Ajp13.java:641)
JR>         at org.apache.ajp.Ajp13.doRead(Ajp13.java:540)
JR>         at org.apache.ajp.tomcat4.Ajp13InputStream.read(Ajp13InputStream.java:95)
JR>         at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
JR>         at
JR> com.oreilly.servlet.MultipartInputStreamHandler.readLine(MultipartInputStrea
JR> mHandler.java:63)
JR>         at
JR> com.oreilly.servlet.MultipartRequest.readAndSaveFile(MultipartRequest.java:4
JR> 21)
JR>         at
JR> com.oreilly.servlet.MultipartRequest.readNextPart(MultipartRequest.java:522)
JR>         at
JR> com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java:610)
JR>         at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:146)
JR>         at
JR> com.psc.ams.servlets.PSCUploadFilesByExtension.doPost(PSCUploadFilesByExtens
JR> ion.java:480)
JR>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
JR>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
JR>         at
JR> org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
JR> :446)
JR>         at
JR> org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
JR>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
JR>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
JR>         at
JR> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
JR> FilterChain.java:247)
JR>         at
JR> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
JR> ain.java:193)
JR>         at
JR> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
JR> va:243)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 66)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
JR>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
JR>         at
JR> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
JR> va:201)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 66)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
JR>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
JR>         at
JR> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
JR>         at
JR> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
JR> )
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 66)
JR>         at
JR> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
JR> java:170)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 64)
JR>         at
JR> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
JR> )
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 64)
JR>         at
JR> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 64)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
JR>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
JR>         at
JR> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
JR> :163)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
JR> 66)
JR>         at
JR> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
JR>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
JR>         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:371)
JR>         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424)
JR>         at java.lang.Thread.run(Thread.java:484)

JR> Environment:
JR> ------------
JR> - Win2000 Server, patched up to latest levels
JR> - Tomcat 4.0.1 Binary distribution, running as a service
JR> - IIS 5.0, using ISAPI_Redirect.dll dated 12/08/01 (Thank you Henri Gomez!)
JR> - SSL Enabled through IIS
JR> - I have several servers with similar environments.  Some servers have
JR> multiple logical web servers with multiple Tomcat instances.  This
JR> particular server has only one instance of each.  However, the same behavior
JR> is observed on any server/instance with SSL.

JR> Facts:
JR> ------
JR> 1] This only happens on https://, all other forms work fine.
JR> 2] This only happens on files larger than just under 11MB (11,172,378 bytes,
JR> plus or minus a few bytes for filename payload).
JR> 3] The "Assert Failed" error comes from Ajp13.java, Ajp13Packet.java, or
JR> MsgAjp.java.  I am not a Java programmer (yes, another one of those
JR> 'systems' guys), but was able to dig throught the source to find the actual
JR> system.out lines.
JR> 4] 11,172,378 / 1364 = 8191+-, the same size as the ajp packet.  Why 1364
JR> ajp packets?  Anything smaller works fine.

JR> -----Original Message-----
JR> From: Christopher Bare [mailto:christopherbare@yahoo.com]
JR> Sent: Tuesday, March 26, 2002 4:16 PM
JR> To: Tomcat Users List
JR> Subject: Re: How to POST very large data to Servlet? (a question about
JR> ServletRequest.getInputStream)


JR> You should look for information on Multipart requests.
JR> It's a modification of the standard http request that
JR> uses a format similar to that used by the SMTP email
JR> protocol. It's used for uploading files from a browser
JR> to a server.

JR> I think Struts has a handler for multipart requests,
JR> and there is another one available at servlets.com in
JR> the package com.oreilly.serlet.

JR> good luck,

JR> -Chris




JR> --- Zhidong Yu <zh...@ipedo.com> wrote:
>> I want to use HTTP's POST method to send some very
>> large and unknown
>> length data to server. The servlet just receives the
>> data and writes
>> them to disk. The data may be larger than server's
>> buffer size.
>> When the doPost method of my servlet is triggered,
>> has all the content
>> of the HTTP request been transferred to server side?
>>
>>
>> If so, how can I POST very large data by HTTP POST
>> method?
>>
>> If not, the calling to getInputStream() does open
>> the valve to accept
>> data. Am I right?
>>

>> ATTACHMENT part 2 application/x-pkcs7-signature
JR> name=smime.p7s


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: How to POST very large data to Servlet? (a question about ServletRequest.getInputStream)

Posted by John Roth <jo...@providersolutions.net>.
Note: Repost of Assert failed, buff too small.

We are currently troubleshooting a problem (originally posted last week
3/20/02) relating to this same issue.  Our application uploads data using an
HTTP POST.  Directly to Tomcat or with HTTP, it works fine.  With HTTPS,
ajp13.java reports "Assert Failed, buff too small", and then the application
produces an exception.  We are using the O'Reilly servlet with our
environment, outlined below.  Anyone with any assistance would be
appreciated.

-----Original Message-----
We are having a problem with Tomcat using an upload servlet to upload
potentially large files (up to 100MB).  The servlet works fine for all file
sizes in the following instances:
http://servername/app/UploadFiles.jsp
http://servername:8080/app/UploadFiles.jsp
but when using https (ie: https://servername/app/UploadFiles.jsp, we get
'Page Cannot Be Displayed'.  A summary of the error logs is below:

IIS_Redirect.Log
----------------
 [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (206)]: sending to ajp13
#8192
 [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (258)]: received from ajp13
#3
 [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
jk_ws_service_t::read
 [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
jk_ws_service_t::read

 ... this repeats 1364 times, everytime, before the following: ...

 [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (206)]: sending to ajp13
#8192
 [Wed Mar 20 15:49:20 2002]  [jk_ajp13_worker.c (258)]: received from ajp13
#3
 [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
jk_ws_service_t::read
 [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (426)]: Into
jk_ws_service_t::read
 [Wed Mar 20 15:49:20 2002]  [jk_isapi_plugin.c (460)]:
jk_ws_service_t::read, ReadClient failed

stdout.log
----------
 Starting service Tomcat-Standalone-(Staging)
 Apache Tomcat/4.0.1
 [Ajp13] bad read: -103
 XXX Assert failed, buff too small

Note: Yes, I have been following the list, and I don't know what causes -103
either, but with the exception of this servlet, our app has been running
great for months, with several dozen -103's a day.  The XXX Assert Failed is
new.

tomcat_log.log
--------------
2002-03-20 15:34:02 UploadFiles: init
2002-03-20 15:34:15 jsp: init
2002-03-20 15:34:15 Ajp13Processor[8009][6] process: invoke
java.net.SocketException: Connection aborted by peer: socket write error
	at java.net.SocketOutputStream.socketWrite(Native Method)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
	at org.apache.ajp.Ajp13.send(Ajp13.java:959)
	at org.apache.ajp.Ajp13.finish(Ajp13.java:808)
	at
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:192)
	at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:373)
	at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424)
	at java.lang.Thread.run(Thread.java:484)

Application Log
---------------
2002-03-20 15:34:03,253 [Ajp13Processor[8009][6]] DEBUG
com.psc.ams.servlets.PSCUploadFilesByExtension - clearing dir
e:/****/staging\jroth
2002-03-20 15:34:03,253 [Ajp13Processor[8009][6]] DEBUG
com.psc.ams.servlets.PSCUploadFilesByExtension - attempting to delete file
e:\****\staging\jroth\11MB.txt
2002-03-20 15:34:15,190 [Ajp13Processor[8009][6]] ERROR
com.psc.ams.servlets.PSCUploadFilesByExtension - Unexpected Exception
occured in PSCUploadFiles.doPost().
java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.apache.ajp.Ajp13Packet.getBytes(Ajp13Packet.java:459)
	at org.apache.ajp.Ajp13.refillReadBuffer(Ajp13.java:641)
	at org.apache.ajp.Ajp13.doRead(Ajp13.java:540)
	at org.apache.ajp.tomcat4.Ajp13InputStream.read(Ajp13InputStream.java:95)
	at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
	at
com.oreilly.servlet.MultipartInputStreamHandler.readLine(MultipartInputStrea
mHandler.java:63)
	at
com.oreilly.servlet.MultipartRequest.readAndSaveFile(MultipartRequest.java:4
21)
	at
com.oreilly.servlet.MultipartRequest.readNextPart(MultipartRequest.java:522)
	at
com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java:610)
	at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:146)
	at
com.psc.ams.servlets.PSCUploadFilesByExtension.doPost(PSCUploadFilesByExtens
ion.java:480)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:446)
	at
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:371)
	at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:424)
	at java.lang.Thread.run(Thread.java:484)

Environment:
------------
- Win2000 Server, patched up to latest levels
- Tomcat 4.0.1 Binary distribution, running as a service
- IIS 5.0, using ISAPI_Redirect.dll dated 12/08/01 (Thank you Henri Gomez!)
- SSL Enabled through IIS
- I have several servers with similar environments.  Some servers have
multiple logical web servers with multiple Tomcat instances.  This
particular server has only one instance of each.  However, the same behavior
is observed on any server/instance with SSL.

Facts:
------
1] This only happens on https://, all other forms work fine.
2] This only happens on files larger than just under 11MB (11,172,378 bytes,
plus or minus a few bytes for filename payload).
3] The "Assert Failed" error comes from Ajp13.java, Ajp13Packet.java, or
MsgAjp.java.  I am not a Java programmer (yes, another one of those
'systems' guys), but was able to dig throught the source to find the actual
system.out lines.
4] 11,172,378 / 1364 = 8191+-, the same size as the ajp packet.  Why 1364
ajp packets?  Anything smaller works fine.

-----Original Message-----
From: Christopher Bare [mailto:christopherbare@yahoo.com]
Sent: Tuesday, March 26, 2002 4:16 PM
To: Tomcat Users List
Subject: Re: How to POST very large data to Servlet? (a question about
ServletRequest.getInputStream)


You should look for information on Multipart requests.
It's a modification of the standard http request that
uses a format similar to that used by the SMTP email
protocol. It's used for uploading files from a browser
to a server.

I think Struts has a handler for multipart requests,
and there is another one available at servlets.com in
the package com.oreilly.serlet.

good luck,

-Chris




--- Zhidong Yu <zh...@ipedo.com> wrote:
> I want to use HTTP's POST method to send some very
> large and unknown
> length data to server. The servlet just receives the
> data and writes
> them to disk. The data may be larger than server's
> buffer size.
> When the doPost method of my servlet is triggered,
> has all the content
> of the HTTP request been transferred to server side?
>
>
> If so, how can I POST very large data by HTTP POST
> method?
>
> If not, the calling to getInputStream() does open
> the valve to accept
> data. Am I right?
>

> ATTACHMENT part 2 application/x-pkcs7-signature
name=smime.p7s



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards.
http://movies.yahoo.com/

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: How to POST very large data to Servlet? (a question about ServletRequest.getInputStream)

Posted by Christopher Bare <ch...@yahoo.com>.
You should look for information on Multipart requests.
It's a modification of the standard http request that
uses a format similar to that used by the SMTP email
protocol. It's used for uploading files from a browser
to a server.

I think Struts has a handler for multipart requests,
and there is another one available at servlets.com in
the package com.oreilly.serlet.

good luck,

-Chris




--- Zhidong Yu <zh...@ipedo.com> wrote:
> I want to use HTTP's POST method to send some very
> large and unknown
> length data to server. The servlet just receives the
> data and writes
> them to disk. The data may be larger than server's
> buffer size. 
> When the doPost method of my servlet is triggered,
> has all the content
> of the HTTP request been transferred to server side?
> 
> 
> If so, how can I POST very large data by HTTP POST
> method? 
> 
> If not, the calling to getInputStream() does open
> the valve to accept
> data. Am I right?
> 

> ATTACHMENT part 2 application/x-pkcs7-signature
name=smime.p7s



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


How to POST very large data to Servlet? (a question about ServletRequest.getInputStream)

Posted by Zhidong Yu <zh...@ipedo.com>.
I want to use HTTP's POST method to send some very large and unknown
length data to server. The servlet just receives the data and writes
them to disk. The data may be larger than server's buffer size. 
When the doPost method of my servlet is triggered, has all the content
of the HTTP request been transferred to server side? 

If so, how can I POST very large data by HTTP POST method? 

If not, the calling to getInputStream() does open the valve to accept
data. Am I right?