struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [FRIDAY] [OT] HTML Reports
Date Fri, 05 Jan 2007 22:16:54 GMT
Hash: SHA1


Joel Espinosa wrote:
> 1.- Is a good practice to save HTML code in the database?

Not really. But, if you save XML in the database, you could transform it
using XSLT into HTML. XML is a much better storage format than HTML. You
could also use a simple tag-based format like that used in mediawiki
(where, for instance, things like a link look like this:
[url=http://host/]link text[/url]).

> 2.- How I will know where to put the <bean:write> tags in the document?

Another advantage of using a templating system, or XML. You can put
hooks in there that can be replaced with whatever you want.

> 3.- And how to inject variable fields into the contract.

See above.

> 4.- Am I missing something in Struts that could help me in order to
> achieve this?

Not really. Although Struts helps you separate your apps (appropriately,
IMHO) into model, view, and controller segments, it really doesn't have
a ton of "view" support. I mean, sure, the JSP taglibs exist and are
really helpful, but they're only there because JSP is one of the most
popular view technologies available, and it makes sense to package them
together (well, it did before the JSTL was available).

Anyhow, Struts doesn't really have anything for you, here. You'll have
to roll your own solution using some form of templating or whatever.

- -chris

Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message