• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets & XML

 
Simon Xu
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

How to output a XML file from a servlet?
Thanks
 
Nirban Dutta
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic