I have a XML Document (org.jdom.Document) in a Servlet. From this Servlet I forward to a JSP where I use JSTL XML to render elementes of the XMLs.
In order to access the XML via JSTL x, I cannot pass the Document directly to the JSP.
I have to convert it to a String via XMLOutputter and put that into a request attribute;
then in the JSP I have to parse it via
into a XML Document-like (internal) format, so that I can finally access it via e. g.
That converting into a String and the parsing is unneccessary overhead work.
How can I accomplish that more efficient?
I. e. directly putting the Document as request attribute and use it without parsing with <x:parse>?
As doc attribute of <x:parse> beside String there is also possible java.io.Reader; that were the classical case if I would read the XML from file via <c:import>.
Here not usable, I get the XML in the servlet from an XML server.
Maybe I could easily convert Document to the internal format that <x:> uses - how?