RE: Urgent .Please help me out

2004-09-22 Thread Robert Shields
Hi

Can you read this please:
http://www.catb.org/~esr/faqs/smart-questions.html

And then consider the following:
- This seems like a servlet or JSP question rather than a Tomcat question.
http://www.catb.org/~esr/faqs/smart-questions.html#forum

- There is no explanation of the cirumstances surrounding the problem, or any source 
code to look at.
http://www.catb.org/~esr/faqs/smart-questions.html#beprecise

- The subject line contains urgent and doesn't describe the problem.
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
http://www.catb.org/~esr/faqs/smart-questions.html#bespecific

Regards,
Rob


-Original Message-
From: Shanti Priya [mailto:[EMAIL PROTECTED]
Sent: Wed 9/22/2004 8:12 AM
To: Tomcat-User
Subject: Urgent .Please help me out
 
Hi !!
   I have deployed an application on tomcat 4.1.18. I do get the
following exception .I am using IE6 as my webbrowser.

(snip)

Thanks  Regards,
Shanti Priya Sunkara

Location: Pune, India
Email   : [EMAIL PROTECTED]



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



servlet request.getInputStream() always returns an empty stream

2004-07-15 Thread Robert Shields
Hi,

request.getInputStream() always gives me an empty stream, even though
request.getContentLength() is non-zero (18)!



public class TestServlet extends HttpServlet {
   ResourceBundle rb = ResourceBundle.getBundle(LocalStrings);
   
   public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws IOException, ServletException
   {
InputStream inputStream = request.getInputStream();


int length = request.getContentLength(); // 18

String contentType= request.getContentType();
  // application/x-www-form-urlencoded

int bytesAvailable = inputStream.available(); // 0

byte[] buf = new byte[1024];
int bytesread;

// bytesread is always -1
while((bytesread = inputStream.read(buf)) != -1)
{
// do stuff
}
   }

   public void doPost(HttpServletRequest request,
 HttpServletResponse response)
   throws IOException, ServletException
   {
   doGet(request, response);
   }
}


So bytesAvailable () is always 0, and inputStream.read(buf) immediately
returns -1.

Could there be something wrong with the configuration of Tomcat? If so,
what could it be?
I'm using Tomcat 5.0.25.

Thanks in advance,
Rob


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
_

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