Hi all,

I'm not sure if my question should be addressed to the Tomcat or dom4j
list, so this
is going to both.

I'm running Tomcat for my company intranet and most of my Java
applications return
their results as XML so that I can style the data with XSLT.  I am using
dom4j
to dynamically build up the DOM (dom4j Document) and I pass that to a
Transformer
in a servlet.

Since I want to slice'n'dice these results with XSLT, I am keeping hold
of the Document
on the server using an HttpSession entry so it's sitting there as I
apply the different
stylesheets (specified as a servlet parameter).

I've read that dom4j in-memory representations are 8-to-10 times the
size of the XML
text - so I am very aware that my solution is not scalable (my current
project results
are about 1MB on disc).

Is there a "best practice" for this sort of thing?  Should I be
serializing the Document
to a DB or something and just keeping a handle to that in the
HttpSessions?   Should I be
using SAX in some clever way?

I'm sure it's a common task to handle medium-sized results from Tomcat.

Any input would be gratefully received.


Best regards
Chris

-- 

Chris Ward, Horizon Asset Limited
<mailto:[EMAIL PROTECTED]>
Tel +44 (20) 7367 7028, Fax 7367 7029


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to