Getting the results of JSP within an Action

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting the results of JSP within an Action

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting the results of JSP within an Action

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 <[hidden email]>:

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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting the results of JSP within an Action

Rick Grashel
Agree, definitely use Velocity for this.  This is exactly the kind of use case that Velocity wad intended foe.

-- Rick

On Apr 7, 2017 7:15 AM, "Nestor Hernandez" <[hidden email]> wrote:
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 <[hidden email]>:

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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users