struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <>
Subject RE: Model 2 with a half-order of X
Date Wed, 12 Mar 2003 14:06:29 GMT

I haven't tried this before, but it seems like one solution would be
to generate your XML doc in the Action (or some delegate) and place
it in the appropriate scope and then use XTags
( to transform
the doc.

Another solution, would be to generate the XML doc and transform it in the
Action (or delegate) and then write directly to the response output stream
and return a null ActionForward which will tell Struts that the response
has been handled. Ofcourse, you will have to render the entire page (header,
body, footer).

You may also want to look into Cocoon. I believe its just servlet, instead
an entire framework, which can be used to transform XML docs.



> -----Original Message-----
> From: Jeff Smith []
> Sent: Tuesday, March 11, 2003 4:51 PM
> To: Struts Users Mailing List
> Subject: Model 2 with a half-order of X
> I've got a situation where a lot of the content in my app is going to be
> based on structured documents that are pulled from my database.
> I'd like to be able to create an XML representation of this doc
> (at display
> time) and then apply a user-selected XSLT to transform the doc
> into a couple
> of different structures (perhaps a summary view, a detailed view and a
> change-log view) before finally applying some style sheets (CSS or XSL) to
> display it.
> I've looked at Model2X and StrutsCX, but they're way overkill for
> my needs.
> I'm quite happy with struts/JSP for my site layout and navigation. I don't
> want to re-write my entire site just to transform a few document pages.
> Does anybody have any suggestions for how to do XML generation and XSLT
> transformation from within an Action method?
> I imagine doing this with a two-step action. Step one is a docPreparation
> step that creates the XML and does the content transformation. Step 2
> (chained from step 1) would then render the doc to the tile that I'm using
> for doc presentation.
> Any pointers would be appreciated.
> Jefficus
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message