Re: InputBuffer and Posting Data

2006-03-29 Thread Jon Wingfield
After re-reading the original description you should probably be aware 
of this portion of the javadocs for request.getParameter:


quote
If the parameter data was sent in the request body, such as occurs with 
an HTTP POST request, then reading the body directly via 
getInputStream() or getReader() can interfere with the execution of this 
method.

/quote

The reverse is probably true, too. The getParameter call probably 
affects the reading of body data for POSTs. Are the parameters you need 
in the query string? If so you may need to parse that yourself instead.


The above may not be the problem. But...

Jon





Vikram Goyal wrote:

It's funny you should say that. maxHttpHeaderSize is the incorrect parameter to 
use in this case, but I noticed that by changing the size of this header 
parameter, I was able to send larger files, although not consistently. But what 
I don't understand is how this parameter is affecting the size of the received 
data. There is clearly a bug here, but I just can't put my finger on what 
exactly the bug is.

Vikram

-Original Message-
From: Lothar Krenzien [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 29 March 2006 1:17 AM

To: Tomcat Users List
Subject: Re: InputBuffer and Posting Data


Look for the value of maxHttpHeaderSize  in your server.xml in the 
CATALINA_HOME/conf diretory. I had a similar problem.


-Ursprüngliche Nachricht-
Von: Tomcat Users List users@tomcat.apache.org
Gesendet: 28.03.06 16:24:20
An: Tomcat Users List users@tomcat.apache.org
Betreff: Re: InputBuffer and Posting Data



What is buf.length? Is it the actual length of the data you want to post 
or is it 8k?
The data you receive on the Tomcat side may be truncated by the 
Connector if the body data is longer than the value set for the 
Content-Length header.


HTH,

Jon

Vikram Goyal wrote:

Hi all,

 


I am trying to post some data via an applet to a JSP running on Tomcat
5.5.16. In my applet code, I am setting the following:

 


postConn.setRequestMethod(POST);

 


postConn.setRequestProperty(Content-Length, (buf.length) + );

 


postConn.setRequestProperty(Content-Type, application/octet-stream);

 


Now, on the server side, I am retrieving my actual data by using the
ServletInputStream gathered from request.getInputStream() method. The
connection also contains some query parameters, which I am retrieving on
the server side using request.getParameter().

 


Now, irrespective of the size of the data that I post, the
ServletInputStream is truncating the data to a size of 8K (for files
greater than that size, smaller files are the received correctly). I
understand, after going through the source code, that the Request class
uses the InputBuffer class for reading from this stream and the default
size of the buffer for this operation is 8K. However, I would have
expected this buffer to grow, if the data was larger than this default,
but this is not happening.

 


Is there a setting to increase this buffer automatically that I need to
set? Alternatively, is there a setting that I need to set that will set
the default to a larger value? I have searched and searched and cannot
find anything.

 


Thanks,

Vikram

 

 






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




__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


-
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: InputBuffer and Posting Data

2006-03-28 Thread Jon Wingfield
What is buf.length? Is it the actual length of the data you want to post 
or is it 8k?
The data you receive on the Tomcat side may be truncated by the 
Connector if the body data is longer than the value set for the 
Content-Length header.


HTH,

Jon

Vikram Goyal wrote:

Hi all,

 


I am trying to post some data via an applet to a JSP running on Tomcat
5.5.16. In my applet code, I am setting the following:

 


postConn.setRequestMethod(POST);

 


postConn.setRequestProperty(Content-Length, (buf.length) + );

 


postConn.setRequestProperty(Content-Type, application/octet-stream);

 


Now, on the server side, I am retrieving my actual data by using the
ServletInputStream gathered from request.getInputStream() method. The
connection also contains some query parameters, which I am retrieving on
the server side using request.getParameter().

 


Now, irrespective of the size of the data that I post, the
ServletInputStream is truncating the data to a size of 8K (for files
greater than that size, smaller files are the received correctly). I
understand, after going through the source code, that the Request class
uses the InputBuffer class for reading from this stream and the default
size of the buffer for this operation is 8K. However, I would have
expected this buffer to grow, if the data was larger than this default,
but this is not happening.

 


Is there a setting to increase this buffer automatically that I need to
set? Alternatively, is there a setting that I need to set that will set
the default to a larger value? I have searched and searched and cannot
find anything.

 


Thanks,

Vikram

 

 







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



Re: InputBuffer and Posting Data

2006-03-28 Thread Lothar Krenzien

Look for the value of maxHttpHeaderSize  in your server.xml in the 
CATALINA_HOME/conf diretory. I had a similar problem.

 -Ursprüngliche Nachricht-
 Von: Tomcat Users List users@tomcat.apache.org
 Gesendet: 28.03.06 16:24:20
 An: Tomcat Users List users@tomcat.apache.org
 Betreff: Re: InputBuffer and Posting Data


 What is buf.length? Is it the actual length of the data you want to post 
 or is it 8k?
 The data you receive on the Tomcat side may be truncated by the 
 Connector if the body data is longer than the value set for the 
 Content-Length header.
 
 HTH,
 
 Jon
 
 Vikram Goyal wrote:
  Hi all,
  
   
  
  I am trying to post some data via an applet to a JSP running on Tomcat
  5.5.16. In my applet code, I am setting the following:
  
   
  
  postConn.setRequestMethod(POST);
  
   
  
  postConn.setRequestProperty(Content-Length, (buf.length) + );
  
   
  
  postConn.setRequestProperty(Content-Type, application/octet-stream);
  
   
  
  Now, on the server side, I am retrieving my actual data by using the
  ServletInputStream gathered from request.getInputStream() method. The
  connection also contains some query parameters, which I am retrieving on
  the server side using request.getParameter().
  
   
  
  Now, irrespective of the size of the data that I post, the
  ServletInputStream is truncating the data to a size of 8K (for files
  greater than that size, smaller files are the received correctly). I
  understand, after going through the source code, that the Request class
  uses the InputBuffer class for reading from this stream and the default
  size of the buffer for this operation is 8K. However, I would have
  expected this buffer to grow, if the data was larger than this default,
  but this is not happening.
  
   
  
  Is there a setting to increase this buffer automatically that I need to
  set? Alternatively, is there a setting that I need to set that will set
  the default to a larger value? I have searched and searched and cannot
  find anything.
  
   
  
  Thanks,
  
  Vikram
  
   
  
   
  
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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



RE: InputBuffer and Posting Data

2006-03-28 Thread Vikram Goyal
Sorry Jon. Buf.length is the size of the buffer that I want to post. I
have confirmed that this is being sent correctly. But as I said earlier,
on the server side 8K is the maximum size of this data that is read.

Vikram

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 29 March 2006 12:25 AM
To: Tomcat Users List
Subject: Re: InputBuffer and Posting Data

What is buf.length? Is it the actual length of the data you want to post

or is it 8k?
The data you receive on the Tomcat side may be truncated by the 
Connector if the body data is longer than the value set for the 
Content-Length header.

HTH,

Jon

Vikram Goyal wrote:
 Hi all,
 
  
 
 I am trying to post some data via an applet to a JSP running on Tomcat
 5.5.16. In my applet code, I am setting the following:
 
  
 
 postConn.setRequestMethod(POST);
 
  
 
 postConn.setRequestProperty(Content-Length, (buf.length) + );
 
  
 
 postConn.setRequestProperty(Content-Type,
application/octet-stream);
 
  
 
 Now, on the server side, I am retrieving my actual data by using the
 ServletInputStream gathered from request.getInputStream() method. The
 connection also contains some query parameters, which I am retrieving
on
 the server side using request.getParameter().
 
  
 
 Now, irrespective of the size of the data that I post, the
 ServletInputStream is truncating the data to a size of 8K (for files
 greater than that size, smaller files are the received correctly). I
 understand, after going through the source code, that the Request
class
 uses the InputBuffer class for reading from this stream and the
default
 size of the buffer for this operation is 8K. However, I would have
 expected this buffer to grow, if the data was larger than this
default,
 but this is not happening.
 
  
 
 Is there a setting to increase this buffer automatically that I need
to
 set? Alternatively, is there a setting that I need to set that will
set
 the default to a larger value? I have searched and searched and cannot
 find anything.
 
  
 
 Thanks,
 
 Vikram
 
  
 
  
 
 



-
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: InputBuffer and Posting Data

2006-03-27 Thread Farrow, Marc
This would seem like a Java question and not a Tomcat question.

-Original Message-
From: Vikram Goyal [mailto:[EMAIL PROTECTED]
Sent: Monday, March 27, 2006 12:47 AM
To: users@tomcat.apache.org
Subject: InputBuffer and Posting Data

Hi all,



I am trying to post some data via an applet to a JSP running on Tomcat
5.5.16. In my applet code, I am setting the following:



postConn.setRequestMethod(POST);



postConn.setRequestProperty(Content-Length, (buf.length) + );



postConn.setRequestProperty(Content-Type, application/octet-stream);



Now, on the server side, I am retrieving my actual data by using the
ServletInputStream gathered from request.getInputStream() method. The
connection also contains some query parameters, which I am retrieving on
the server side using request.getParameter().



Now, irrespective of the size of the data that I post, the
ServletInputStream is truncating the data to a size of 8K (for files
greater than that size, smaller files are the received correctly). I
understand, after going through the source code, that the Request class
uses the InputBuffer class for reading from this stream and the default
size of the buffer for this operation is 8K. However, I would have
expected this buffer to grow, if the data was larger than this default,
but this is not happening.



Is there a setting to increase this buffer automatically that I need to
set? Alternatively, is there a setting that I need to set that will set
the default to a larger value? I have searched and searched and cannot
find anything.



Thanks,

Vikram






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



Re: InputBuffer and Posting Data

2006-03-27 Thread Mike Sabroff

This IS a java question.
If post.Conn is a URLConnection you opened from the applet (looks that 
way) then you need to call setDoInput()
and setDoOutput() methods (basically read/write) to make it a post. 
There is also a setUseCaches() (true or false)
to control caching, default is true (reload button). Most of my 
statement is from the Javadocs.




Vikram Goyal wrote:


Hi all,



I am trying to post some data via an applet to a JSP running on Tomcat
5.5.16. In my applet code, I am setting the following:



postConn.setRequestMethod(POST);



postConn.setRequestProperty(Content-Length, (buf.length) + );



postConn.setRequestProperty(Content-Type, application/octet-stream);



Now, on the server side, I am retrieving my actual data by using the
ServletInputStream gathered from request.getInputStream() method. The
connection also contains some query parameters, which I am retrieving on
the server side using request.getParameter().



Now, irrespective of the size of the data that I post, the
ServletInputStream is truncating the data to a size of 8K (for files
greater than that size, smaller files are the received correctly). I
understand, after going through the source code, that the Request class
uses the InputBuffer class for reading from this stream and the default
size of the buffer for this operation is 8K. However, I would have
expected this buffer to grow, if the data was larger than this default,
but this is not happening.



Is there a setting to increase this buffer automatically that I need to
set? Alternatively, is there a setting that I need to set that will set
the default to a larger value? I have searched and searched and cannot
find anything.



Thanks,

Vikram







--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



RE: InputBuffer and Posting Data

2006-03-27 Thread Vikram Goyal
Apologies.

Those methods are being set. I don't understand why this is a Java
question though. The InputBuffer is a Tomcat class and the default of 8K
is being set in that, which is restricting the transfer of my data.

Vikram

-Original Message-
From: Mike Sabroff [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 28 March 2006 1:09 AM
To: Tomcat Users List
Subject: Re: InputBuffer and Posting Data

This IS a java question.
If post.Conn is a URLConnection you opened from the applet (looks that 
way) then you need to call setDoInput()
and setDoOutput() methods (basically read/write) to make it a post. 
There is also a setUseCaches() (true or false)
to control caching, default is true (reload button). Most of my 
statement is from the Javadocs.



Vikram Goyal wrote:

 Hi all,



 I am trying to post some data via an applet to a JSP running on Tomcat
 5.5.16. In my applet code, I am setting the following:



 postConn.setRequestMethod(POST);



 postConn.setRequestProperty(Content-Length, (buf.length) + );



 postConn.setRequestProperty(Content-Type,
application/octet-stream);



 Now, on the server side, I am retrieving my actual data by using the
 ServletInputStream gathered from request.getInputStream() method. The
 connection also contains some query parameters, which I am retrieving
on
 the server side using request.getParameter().



 Now, irrespective of the size of the data that I post, the
 ServletInputStream is truncating the data to a size of 8K (for files
 greater than that size, smaller files are the received correctly). I
 understand, after going through the source code, that the Request
class
 uses the InputBuffer class for reading from this stream and the
default
 size of the buffer for this operation is 8K. However, I would have
 expected this buffer to grow, if the data was larger than this
default,
 but this is not happening.



 Is there a setting to increase this buffer automatically that I need
to
 set? Alternatively, is there a setting that I need to set that will
set
 the default to a larger value? I have searched and searched and cannot
 find anything.



 Thanks,

 Vikram






-- 
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


-
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]