Hi Folks,
I want to write a tomcat security Valve that does content checking of the HTTP
body, before anything else happens (e.g. 3rd party destination servlets I have no
control over are called).
However, to read the body data I 'use up' the inputStream, and can't find any way
to put
Hi Folks,
I want to write a tomcat security Valve that does content checking of the HTTP
body, before anything else happens (e.g. 3rd party destination servlets I have no
control over are called).
However, to read the body data I 'use up' the inputStream, and can't find any way
to put
no control over are called).
However, to read the body data I 'use up' the inputStream, and can't find any way to put it back - the result is the final servlet gets an empty body.
Unfortunately, the data is actually HTTP POST data containing SOAP/XML, otherwise I
could use the servlet
: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Mon 8/23/2004 11:07 PM
To: Tomcat Users List
Cc:
Subject:Re: How to write a Valve that can inspect the HTTP Body, without
damaging the InputStream?
Can't you use a java.io.PushbackInputStream?
You could write a Filter instead
. Now
when the servlet gets called the query string is null. This I also can see
in the server log file. Also there is no no query string. I figured out
that the actual query string can be read from the InputStream in the
servlet.
But why is this so? Did I set up something wrong?
This is how
also can see
in the server log file. Also there is no no query string. I figured out
that the actual query string can be read from the InputStream in the
servlet.
But why is this so? Did I set up something wrong?
What do I need to do to just get the query string?
On the web site I tried both
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 2:12 PM
To: Tomcat Users List
Subject: RE: Can't get Servlet Inputstream
Howdy,
Very interesting. Interesting enough that I want to try to reproduce it
myself, but my local tomcat instance
missing something, but it should work.
Thank you,
George
-Original Message-
From: Edson Alves Pereira [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 11:41 AM
To: 'Tomcat Users List'
Subject: RE: Can't get Servlet Inputstream
I´m don´t understand why you need
();
// this returns null, why?
...
}
BTW - I can read the request header and content length fine from the request, just
can't get the inputstream.
Thank you,
George
-
To unsubscribe, e-mail
: Wednesday, February 19, 2003 2:48 PM
To: Tomcat Users List
Subject: Can't get Servlet Inputstream
I am converting a servlet from using Jigsaw's Servlet methods to
Tomcat's
and I am curious why calling getInputstream on the request in Tomcat
returns null. This calls works fine in Jigsaw receiving the same
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 2:12 PM
To: Tomcat Users List
Subject: RE: Can't get Servlet Inputstream
Howdy,
Very interesting. Interesting enough that I want to try to reproduce it
myself, but my local tomcat instance is running a 12-hour long
performance/stress
how to convert reader to the inputstream?
--
To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
On Sun, 15 Dec 2002, Galbayar Dorjgotov wrote:
Date: Sun, 15 Dec 2002 15:31:50 +0800
From: Galbayar Dorjgotov [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: TomCat Users [EMAIL PROTECTED]
Subject: how to convert reader to the inputstream
how to convert reader
I know I'm a looser but can anybody tell me quickly how I can get a Reader
to an InputStream.
I've searched for quite a while but I didn't find anything yet !
PLEASE Thanx
Oliver
AXA eSolutions GmbH
AXA Konzern AG Germany
Oliver Lauer
Web Architect
Wörthstraße 34
D-50668 Köln
Germany
You need a Reader object pointing to an InputStream ?
Reader r=new java.io.InputStreamReader(myInputStream);
is it that what you want ?
-Original Message-
From: Lauer, Oliver [mailto:[EMAIL PROTECTED]]
Sent: donderdag 24 januari 2002 13:05
To: Tomcat Users List (E-Mail)
Subject: READER
No, I've a Reader and need an InputStream, sounds silly but the API needs
so...:-(
AXA eSolutions GmbH
AXA Konzern AG Germany
Oliver Lauer
Web Architect
Wörthstraße 34
D-50668 Köln
Germany
Tel.: +49 221 148 31277
Fax: +49 221 148 43963
Mobil: +49 179 59 064 59
e-Mail: [EMAIL
No, I've a Reader and need an InputStream, sounds silly but
the API needs so...:-(
The abstract class Reader doesn't have any method to report which
InputStream it is connected to.
I think you may be out of luck.
On the other hand, tell us more about the problem - it sounds interesting.
J
Stuff your readers content in an array and open an InputStream with the
array...(ByteArrayInputStream takes an array as a constructor) You have to
play around with it though, since it could be that it needs some conversion
of some sort to corrrectly end up in the inputstream..
Mvgr,
Martin
;
I need an InputStream for the unmarshal method of the generated JAXB classes
(stoccs)
This one doesn't work - it is null:
--
InputStream ip
]
_
-Ursprüngliche Nachricht-
Von: Martin van den Bemt [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 24. Januar 2002 13:41
An: Tomcat Users List
Betreff: RE: READER to InputStream
Stuff your readers content in an array and open an InputStream with the
array...(ByteArrayInputStream takes an array
to InputStream
But I need byte[] - how do I get that ?
AXA eSolutions GmbH
AXA Konzern AG Germany
Oliver Lauer
Web Architect
Wörthstraße 34
D-50668 Köln
Germany
Tel.: +49 221 148 31277
Fax: +49 221 148 43963
Mobil: +49 179 59 064 59
e-Mail: [EMAIL PROTECTED
: Thursday, January 24, 2002 13:19
To: 'Tomcat Users List'
Subject: AW: READER to InputStream
No, I've a Reader and need an InputStream, sounds silly but the
API needs
so...:-(
AXA eSolutions GmbH
AXA Konzern AG Germany
Oliver Lauer
Web Architect
W?rthstra?e
I discovered that a problem that existed in the ajp13 connector also appears
in another place in the code. When you do a request.getInputStream().read()
some data will cause that to return a -1 even though there is more data to
be read.
The solution before (ajp13) was to AND the byte being
On Thu, 25 Oct 2001, Yoav Shapira wrote:
Date: Thu, 25 Oct 2001 09:33:15 -0400
From: Yoav Shapira [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Can't open InputStream to manager??
Hi there,
I have a servlet that tries to do something like:
URL url
Hi there,
I have a servlet that tries to do something like:
URL url = new
URL(http://manageruser:[EMAIL PROTECTED]:myport/manager/list;);
URLConnection con = url.openConnection();
BufferedReader bin = new BufferedReader(new
InputStreamReader(con.getInputStream);
The third line throws an
hi everyone,
i'm trying to use a form to upload a file from the webpage to my server.
i don't want to store the file on myserver, i just want to receive the file
data and send it somewhere else right away.
i know that i have to parse the received data to eliminate the boundaries
and th content
: Georges Boutros [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 8:51 AM
To: Tomcat (E-mail)
Subject: inputstream
hi everyone,
i'm trying to use a form to upload a file from the webpage to my server.
i don't want to store the file on myserver, i just want to
receive the file
data
.
But this is the wrong way to look at an inputstream.
The input data has to go somewhere, right? I would
assume also that your going to write the input into
an output stream, so theoretically you'll not need to
worry about a limit. Presumably the data is going somewhere
as soon as it comes in. What you really need
I have found this differs between the JRE on the platform. In my
experience, BufferedInputStream in IE 5.5 (no plugin) would get corrupted
so I had to read the full value returned by
URLConnection.getContentLength(). With Netscape 4.7, no plugin, I read
chunks as determined by
TECTED]
To: [EMAIL PROTECTED]
Subject: Re: inputstream
Date: Mon, 30 Apr 2001 09:29:08 -0700
At 11:51 AM 4/30/2001 -0400, you wrote:
hi everyone,
i'm trying to use a form to upload a file from the webpage to my
server.
i don't want to store the file on myserver, i just want to r
Software Architect
[EMAIL PROTECTED]
www.filip.net
-Original Message-
From: Thad Humphries [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 9:30 AM
To: [EMAIL PROTECTED]
Subject: Re: inputstream
I have found this differs between the JRE on the platform. In my
experience
in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net
-Original Message-
From: Allen Levin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 10:14 AM
To: [EMAIL PROTECTED]
Subject: Re: inputstream
I fought with this for a very long time. It was difficult, I found
PROTECTED]]
Sent: Wednesday, April 25, 2001 3:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: jsp:include [servlet] -- InputStream already obtained
for this request
You can't include a servlet.
You can call a servlet through a URL or you can include JSP
I have no answers for your other
I'm trying to call include a servlet from JSP. The servlet needs to
parse CGI data from the InputStream object of the HttpServletRequest.
Is there any way to get Tomcat not to obtain the InputStream? Or, if
that is not possible, is there a way to call recycle() on the
implementation
: jsp:include [servlet] -- InputStream already obtained
for this request
You can't include a servlet.
You can call a servlet through a URL or you can include JSP
I have no answers for your other questions
-Original Message-
From: Michael Toulouse [mailto:[EMAIL PROTECTED]]
Sent: Wednesday
If I send an empty get request to my servlet, get the inputstream, and do a
read it will block forever.
(eg: just call the servlet from IE or Netscape it just hangs).
InputStream in = servletRequest.getInputStream();
byte[] buffer = new byte[bufferSize];
ByteArrayOutputStream byteStream = new
36 matches
Mail list logo