my dog learned polymorphism*
The moose likes Servlets and the fly likes Problem with reading submitted document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with reading submitted document" Watch "Problem with reading submitted document" New topic
Author

Problem with reading submitted document

Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
I need to read XML document submitted to doPost() method ( I do not want to upload it, just read in and pass for further processing). Here is a general code that I use for now to see if file been received.


To test this I use curl utility to pass file to url as


However content of the file is not printed, only new line is added which means process riches sb.append(line + "\n"); command.

Any advice is welcome.
Peter Miklosko
Ranch Hand

Joined: May 26, 2009
Posts: 76
Little late in the day , but here is answer.
Curl execution command was wrong
Window version with double quotes

Unix version with single quotes


And in case you interested in forwarding file to doPut() of your servlet use
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with reading submitted document