File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet response" Watch "servlet response" New topic

servlet response

Ve Ku

Joined: Sep 17, 2010
Posts: 19
I have a simple problem. Developing a servlet , which parses a xml. The xml is provided by third party. The third party expects a string for reply , if the XML is ok and is parsed. What is the most appropriate way to send that response from the servlet ?

Ankit Tripathi
Ranch Hand

Joined: Oct 17, 2009
Posts: 199
Go through this link for a short-cut.

Use this code in your servlet and give your custom message to be printed at browser in output stream.

If you want to know about SAX(API for XML),then implement it yourself,study it here-

Ve Ku

Joined: Sep 17, 2010
Posts: 19
Exactly what i needed, thanks. I've already did the parsing, but will take a look at the second link anyway. Thanks.
I agree. Here's the link:
subject: servlet response
It's not a secret anymore!