Discussion:
[Stripes-users] Getting the results of JSP within an Action
Heather and Jon Turgeon
2017-04-07 06:58:15 UTC
Permalink
Hi all, within my Stripes based website I do a few of thing. One of them is to create emails to send out to users. I am using HTML emails with the bodies written as strings (a bit of work and very messy). What I would like to do is use an Action to get the data from the db, then do a Resolution to a JSP, but get the results of the resolution within the Action in the form of a String. This way I can use JSP as an email template, grab the result and use this as the body of an email. Hopefully this is possible and thanks for any help.


Jon
Nestor Hernandez
2017-04-07 12:14:27 UTC
Permalink
Uhh, it's very strange what you do because JSP are not intended for that.
Why not use a template library like Velocity, Freemaker or Mustache?

2017-04-07 1:58 GMT-05:00 Heather and Jon Turgeon <
Post by Heather and Jon Turgeon
Hi all, within my Stripes based website I do a few of thing. One of them
is to create emails to send out to users. I am using HTML emails with the
bodies written as strings (a bit of work and very messy). What I would like
to do is use an Action to get the data from the db, then do a Resolution to
a JSP, but get the results of the resolution within the Action in the form
of a String. This way I can use JSP as an email template, grab the result
and use this as the body of an email. Hopefully this is possible and thanks
for any help.
Jon
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users
Rick Grashel
2017-04-07 12:24:34 UTC
Permalink
Agree, definitely use Velocity for this. This is exactly the kind of use
case that Velocity wad intended foe.

-- Rick
Post by Nestor Hernandez
Uhh, it's very strange what you do because JSP are not intended for that.
Why not use a template library like Velocity, Freemaker or Mustache?
2017-04-07 1:58 GMT-05:00 Heather and Jon Turgeon <
Post by Heather and Jon Turgeon
Hi all, within my Stripes based website I do a few of thing. One of them
is to create emails to send out to users. I am using HTML emails with the
bodies written as strings (a bit of work and very messy). What I would like
to do is use an Action to get the data from the db, then do a Resolution to
a JSP, but get the results of the resolution within the Action in the form
of a String. This way I can use JSP as an email template, grab the result
and use this as the body of an email. Hopefully this is possible and thanks
for any help.
Jon
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users
Loading...