Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Urgent: How to create XML In jsp using Javabean  RSS feed

 
viral patel
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...I have orderform, i user orderbean to store data entered in orderform. Now i want to generate xml in jsp using my orderbean. Can i do that. and if i can...can someone show me example how?
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, set the response.contentType to "text/xml".
Now add your bean to the request (or session, or..) scope.
Then just output your information formatted in xml.
Code sample:


HTH
[ March 12, 2003: Message edited by: Juanjo Bazan ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!