Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading HTTP Post data in servlet!!

843840Jan 14 2003 — edited Jan 14 2003
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2003
Added on Jan 14 2003
3 comments
82 views