File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beginning JSP and XML

 
vasudevan gopalan
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am using JRUN server for processing JSP.I want to know
how to use JSP and XML in JRUN server with a small e.g since i dont know XML.
Bye,
Vasu

 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

yesterday someone posted that this is a good article
on the subject.
you see how it helps sneeking in other peoples' posts.
you could also use the search facility. HTH.
regds.
- satya
 
Bart Tubalinal
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is pretty easy to make JSP and XML work together. All you need to do is include at the top of the jsp page this line:
<% response.setContentType("text/xml"); %>
From that point forward, everything will be "considered" xml. You can use any jsp code inside of this xml document.
Example:

The only thing that you need to make sure of is that the document follows xml rules (well-formed and valid, if a dtd/schema is specified).
Note: This is not specifically for JRun, this should work using any JSP container.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic