You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Crawford, Preston" <Pr...@acs-inc.com> on 2007/08/24 00:23:14 UTC

Using Struts/JSP template from within a class/batch process

We have a need to generate a run of HTML files, like a letter or print
batch. We also need to be able to (in real time), generate said
reports/letters. Our infrastructure is Struts, so my lean is to create a
struts page with a JSP template for the on-demand letters and reports. The
question is what to do about the batch, then? I can picture ways to do this
such as doing an HTTP request and hitting the action, retrieving the HTML
and sending that to the printwriter. I was wondering, though, if anyone had
done something similar and had come up with a more elegant solution. The
coder that came before me actually started this part of the project by
generating HTML from a Java class. Now I'm taking over for his work and
being told to do the on-demand side. I would like to get the generated HTML
out of this monster class with a giant stringbuffer and have one JSP
template handle the formatting. I just can't come up with the proper way for
the batch process/java class to make use of said template.
 
Preston
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.