Reading HTTP Post data in servlet!!
843840Jan 14 2003 — edited Jan 14 2003Hi all ,
I am trying to read the HTTP posted data in a servlet. The data is posted by another application/servlet to the my servlet. I didn't know its content-type, or its a form post or a file post(Will I think I can get this information in request headers). All I know that the other servlet is posting the data to my serlvet. Can I just grab the incoming data using request object and post it to another servlet.
//---------
BufferedReader br = req.getReader();
String line=null;
while((line=br.readLine())!= null){
System.out.println("Line ----- >"+ line);
}
//----------
I am seeing nothing in the logs!. I am doing something worng. I appreciate your inputs.
Thanks
MA