RE: Can't get Servlet Inputstream

2003-02-20 Thread Manty, George
The Servlet is listening for requests.  When a request is made it sends a response.  
The request is one of the parameters to the servlet, and you can tell that it has 
content in it, but you can not get the content from the request with getInputStream 
and I don't know why that is.  Maybe I am 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 the InputStream from a Servlet
once servlets just write text to client´s browser. And besides, what are you
expecting to get from InputStream? To get FORM parameters and cookies and
related things from client side you must call resquest methods.

> --
> De:   Manty, George[SMTP:[EMAIL PROTECTED]]
> Responder:Tomcat Users List
> Enviada:  quinta-feira, 20 de fevereiro de 2003 13:34
> Para: Tomcat Users List
> Assunto:  RE: Can't get Servlet Inputstream
> 
> As far as the exception it depends on whether I try to do a getInputSteam
> or getReader call on the request.  If I use getReader, I get an exception
> that says getInputSteam has already been called.  If I change the call to
> getInputStream I always get nothing back.
> 
> Thank you,
> 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 is running a 12-hour long
> performance/stress profile.
> 
> So in the meantime, let me ask this:
> - Which version of tomcat?
> - Which JDK?
> - Does getReader() work?
> - Are any exceptions thrown by the getInputStream request?
> - Are there any relevant exceptions in the tomcat logs?
> - Have you verified your tomcat installation is good by running the
> examples?
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Manty, George [mailto:[EMAIL PROTECTED]]
> >Sent: 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 XML
> data,
> >but returns null in Tomcat.   Any help would be appreciated.   Below is
> a
> >simple example of the code that is failing:
> >
> >public void doPost(HttpServletRequest request, HttpServletResponse
> >response)
> >   throws IOException, ServletException
> >{
> >...
> >System.out.println("Content lenght = "+request.getContentLength());  //
> >this line works
> >ServletInputStream in = request.getInputStream();
> >// 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: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 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]
> 
> 
> -
> 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: Can't get Servlet Inputstream

2003-02-20 Thread Edson Alves Pereira
I´m don´t understand why you need the InputStream from a Servlet
once servlets just write text to client´s browser. And besides, what are you
expecting to get from InputStream? To get FORM parameters and cookies and
related things from client side you must call resquest methods.

> --
> De:   Manty, George[SMTP:[EMAIL PROTECTED]]
> Responder:Tomcat Users List
> Enviada:  quinta-feira, 20 de fevereiro de 2003 13:34
> Para: Tomcat Users List
> Assunto:  RE: Can't get Servlet Inputstream
> 
> As far as the exception it depends on whether I try to do a getInputSteam
> or getReader call on the request.  If I use getReader, I get an exception
> that says getInputSteam has already been called.  If I change the call to
> getInputStream I always get nothing back.
> 
> Thank you,
> 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 is running a 12-hour long
> performance/stress profile.
> 
> So in the meantime, let me ask this:
> - Which version of tomcat?
> - Which JDK?
> - Does getReader() work?
> - Are any exceptions thrown by the getInputStream request?
> - Are there any relevant exceptions in the tomcat logs?
> - Have you verified your tomcat installation is good by running the
> examples?
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Manty, George [mailto:[EMAIL PROTECTED]]
> >Sent: 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 XML
> data,
> >but returns null in Tomcat.   Any help would be appreciated.   Below is
> a
> >simple example of the code that is failing:
> >
> >public void doPost(HttpServletRequest request, HttpServletResponse
> >response)
> >   throws IOException, ServletException
> >{
> >...
> >System.out.println("Content lenght = "+request.getContentLength());  //
> >this line works
> >ServletInputStream in = request.getInputStream();
> >// 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: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 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]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



RE: Can't get Servlet Inputstream

2003-02-20 Thread Manty, George
As far as the exception it depends on whether I try to do a getInputSteam or getReader 
call on the request.  If I use getReader, I get an exception that says getInputSteam 
has already been called.  If I change the call to getInputStream I always get nothing 
back.

Thank you,
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 is running a 12-hour long
performance/stress profile.

So in the meantime, let me ask this:
- Which version of tomcat?
- Which JDK?
- Does getReader() work?
- Are any exceptions thrown by the getInputStream request?
- Are there any relevant exceptions in the tomcat logs?
- Have you verified your tomcat installation is good by running the
examples?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Manty, George [mailto:[EMAIL PROTECTED]]
>Sent: 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 XML
data,
>but returns null in Tomcat.   Any help would be appreciated.   Below is
a
>simple example of the code that is failing:
>
>public void doPost(HttpServletRequest request, HttpServletResponse
>response)
>   throws IOException, ServletException
>{
>...
>System.out.println("Content lenght = "+request.getContentLength());  //
>this line works
>ServletInputStream in = request.getInputStream();
>// 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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]


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




RE: Can't get Servlet Inputstream

2003-02-19 Thread Manty, George
>From the exception thrown it appears as though getinputstream has already been 
>called.  I am using the embedded tomcat class to start Tomcat 4.1.18.  

I have to go now, but I can provide the exact exception thrown later.  

Thank you,
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 is running a 12-hour long
performance/stress profile.

So in the meantime, let me ask this:
- Which version of tomcat?
- Which JDK?
- Does getReader() work?
- Are any exceptions thrown by the getInputStream request?
- Are there any relevant exceptions in the tomcat logs?
- Have you verified your tomcat installation is good by running the
examples?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Manty, George [mailto:[EMAIL PROTECTED]]
>Sent: 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 XML
data,
>but returns null in Tomcat.   Any help would be appreciated.   Below is
a
>simple example of the code that is failing:
>
>public void doPost(HttpServletRequest request, HttpServletResponse
>response)
>   throws IOException, ServletException
>{
>...
>System.out.println("Content lenght = "+request.getContentLength());  //
>this line works
>ServletInputStream in = request.getInputStream();
>// 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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]


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




RE: Can't get Servlet Inputstream

2003-02-19 Thread Shapira, Yoav

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 profile.

So in the meantime, let me ask this:
- Which version of tomcat?
- Which JDK?
- Does getReader() work?
- Are any exceptions thrown by the getInputStream request?
- Are there any relevant exceptions in the tomcat logs?
- Have you verified your tomcat installation is good by running the
examples?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Manty, George [mailto:[EMAIL PROTECTED]]
>Sent: 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 XML
data,
>but returns null in Tomcat.   Any help would be appreciated.   Below is
a
>simple example of the code that is failing:
>
>public void doPost(HttpServletRequest request, HttpServletResponse
>response)
>   throws IOException, ServletException
>{
>...
>System.out.println("Content lenght = "+request.getContentLength());  //
>this line works
>ServletInputStream in = request.getInputStream();
>// 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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]




Can't get Servlet Inputstream

2003-02-19 Thread Manty, George
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 XML data, but returns null in Tomcat.   Any 
help would be appreciated.   Below is a simple example of the code that is failing:

public void doPost(HttpServletRequest request, HttpServletResponse response)
   throws IOException, ServletException
{
...
System.out.println("Content lenght = "+request.getContentLength());  // this line works
ServletInputStream in = request.getInputStream();
// 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]