How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
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

How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
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

Re: How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Jon Wingfield
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

RE: How to write a Valve that can inspect the HTTP Body, without damaging the InputStream?

2004-08-23 Thread Betts, Chris
: 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

Re: Query string / InputStream

2003-06-18 Thread Bill Barker
. 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

Query string / InputStream

2003-06-17 Thread christian . schuster
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

RE: Can't get Servlet Inputstream

2003-02-20 Thread Manty, George
-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

RE: Can't get Servlet Inputstream

2003-02-20 Thread Manty, George
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

Can't get Servlet Inputstream

2003-02-19 Thread Manty, George
(); // 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

RE: Can't get Servlet Inputstream

2003-02-19 Thread Shapira, Yoav
: 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

RE: Can't get Servlet Inputstream

2003-02-19 Thread Manty, George
[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

2002-11-14 Thread Galbayar Dorjgotov
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

Re: how to convert reader to the inputstream

2002-11-14 Thread Craig R. McClanahan
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

READER to InputStream

2002-01-24 Thread Lauer, Oliver
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

RE: READER to InputStream

2002-01-24 Thread Walter De Wit
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

AW: READER to InputStream

2002-01-24 Thread Lauer, Oliver
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

RE: READER to InputStream

2002-01-24 Thread Justin Rowles
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

RE: READER to InputStream

2002-01-24 Thread Martin van den Bemt
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

AW: READER to InputStream / SOAP/JAXB

2002-01-24 Thread Lauer, Oliver
; I need an InputStream for the unmarshal method of the generated JAXB classes (stoccs) This one doesn't work - it is null: -- InputStream ip

AW: READER to InputStream

2002-01-24 Thread Lauer, Oliver
] _ -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

RE: READER to InputStream

2002-01-24 Thread Martin van den Bemt
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

RE: READER to InputStream

2002-01-24 Thread Anton Brazhnyk
: 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

InputStream problem in 4.0/4.0.1 (others?)

2001-11-04 Thread Bret McDanel
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

Re: Can't open InputStream to manager??

2001-10-26 Thread Craig R. McClanahan
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

Can't open InputStream to manager??

2001-10-25 Thread Yoav Shapira
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

inputstream

2001-04-30 Thread Georges Boutros
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

RE: inputstream

2001-04-30 Thread Filip Hanik
: 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

Re: inputstream

2001-04-30 Thread Tim O'Neil
. 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

Re: inputstream

2001-04-30 Thread Thad Humphries
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

Re: inputstream

2001-04-30 Thread Allen Levin
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

RE: inputstream

2001-04-30 Thread Filip Hanik
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

RE: inputstream

2001-04-30 Thread Filip Hanik
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

RE: jsp:include [servlet] -- InputStream already obtained forthis request

2001-04-26 Thread Mark Howell
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

jsp:include [servlet] -- InputStream already obtained for this request

2001-04-25 Thread Michael Toulouse
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

RE: jsp:include [servlet] --InputStream already obtained for this request

2001-04-25 Thread Andy Nuss
: 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

Inputstream blocking during read, when there is nothing to read

2001-04-04 Thread Adam Ratica
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