This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes XML writing and reading to an URl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "XML writing and reading to an URl" Watch "XML writing and reading to an URl" New topic
Author

XML writing and reading to an URl

Ajith George
Ranch Hand

Joined: Dec 22, 2005
Posts: 109
i was trying to submit xml data to a url. and try to read the same using stream reader. But as i read the server is returning internal server error. i am attaching the code here.



Please help me out.
Thanks in advance.


SCJP 1.4, Brainbench
LinkedIn - Blog
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Since it's the server that's crashing, it's the server that has the problem -- at least in its error handling, if not more.

But you can might start by flushing and closing the PrintWriter before trying to read the response!


[Jess in Action][AskingGoodQuestions]
Ajith George
Ranch Hand

Joined: Dec 22, 2005
Posts: 109
i flushed and closed the print writer ......but the result same. Is there any other way to read the response. Am i doing it right?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: XML writing and reading to an URl
 
Similar Threads
Read XML output from a URL
Unable to read the Japanese character from HTTP Response
Unable to access URL using HttpURLConnection
servlet response
Streaming PDF, Connecion Error