This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlets & XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets & XML" Watch "servlets & XML" New topic

servlets & XML

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235

How to output a XML file from a servlet?
Nirban Dutta

Joined: Jun 20, 2001
Posts: 9
write in the beginning response.setContenetType("text/xml");
Then,uou write the xml content inside ur servlet out.println();
where response is ur HttpServletResponse object and out is printwriter for ur response.
I think u can understand.
I agree. Here's the link:
subject: servlets & XML
It's not a secret anymore!