Discussion:
[Stripes-users] Stripes-users Digest, Vol 121, Issue 1
Heather and Jon Turgeon
2017-05-03 21:02:18 UTC
Permalink
Thanks guys, for my first question I ended up using FreeMarker which so far is working great.


For my second question about getting a JSON Payload from a Post from a Relay Webhook from Sparkpost . I see several examples of how to do this with a servlet but I was hoping that Stripes could handle this. Anyone have an idea as to if this is possible and if not any good ideas as to how to implement? Thanks for any help.


Jon


________________________________
From: stripes-users-***@lists.sourceforge.net <stripes-users-***@lists.sourceforge.net>
Sent: Thursday, April 20, 2017 1:05 PM
To: stripes-***@lists.sourceforge.net
Subject: Stripes-users Digest, Vol 121, Issue 1

Send Stripes-users mailing list submissions to
stripes-***@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/stripes-users
Stripes-users Info Page - SourceForge<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to build applications. This is the appropriate place to ask for help and to report problems that ...


or, via email, send a message with subject or body 'help' to
stripes-users-***@lists.sourceforge.net

You can reach the person managing the list at
stripes-users-***@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Stripes-users digest..."


Today's Topics:

1. Getting the results of JSP within an Action
(Heather and Jon Turgeon)
2. Re: Getting the results of JSP within an Action (Nestor Hernandez)
3. Re: Getting the results of JSP within an Action (Rick Grashel)
4. Raw Body With ActionBean (Heather and Jon Turgeon)


----------------------------------------------------------------------

Message: 1
Date: Fri, 7 Apr 2017 06:58:15 +0000
From: Heather and Jon Turgeon <***@hotmail.com>
Subject: [Stripes-users] Getting the results of JSP within an Action
To: "stripes-***@lists.sourceforge.net"
<stripes-***@lists.sourceforge.net>
Message-ID:
<***@DM3PR14MB0969.namprd14.prod.outlook.com>

Content-Type: text/plain; charset="iso-8859-1"

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

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Fri, 7 Apr 2017 07:14:27 -0500
From: Nestor Hernandez <***@gmail.com>
Subject: Re: [Stripes-users] Getting the results of JSP within an
Action
To: Stripes Users List <stripes-***@lists.sourceforge.net>
Message-ID:
<CAMsyVL+YL8WxB_Jq_67Jozm+age3bHe5hB8HrjvTEyfN_2+***@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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 <
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
Stripes-users Info Page - SourceForge<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to build applications. This is the appropriate place to ask for help and to report problems that ...
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Fri, 7 Apr 2017 07:24:34 -0500
From: Rick Grashel <***@gmail.com>
Subject: Re: [Stripes-users] Getting the results of JSP within an
Action
To: Stripes Users List <stripes-***@lists.sourceforge.net>
Message-ID:
<CADoNxeM4HsHUVs-bSbAUxpom-***@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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

-- Rick
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 <
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
Stripes-users Info Page - SourceForge<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to build applications. This is the appropriate place to ask for help and to report problems that ...
------------------------------------------------------------
------------------
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
Stripes-users Info Page - SourceForge<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to build applications. This is the appropriate place to ask for help and to report problems that ...
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Thu, 20 Apr 2017 17:04:53 +0000
From: Heather and Jon Turgeon <***@hotmail.com>
Subject: [Stripes-users] Raw Body With ActionBean
To: "stripes-***@lists.sourceforge.net"
<stripes-***@lists.sourceforge.net>
Message-ID:
<***@DM3PR14MB0969.namprd14.prod.outlook.com>

Content-Type: text/plain; charset="iso-8859-1"

Hi all, I am trying to use SparkPost Relay Webhooks to accept emails, then forward on the content to a ActionBean for processing. I have the forwarding worked out but SparkPost is posting a "raw body" JSON object to the ActionBean. I have never used an ActionBean like this, I usually expect parameters with values. Anyway, is there a way for a Stripes ActionBean to accept this? Thanks for any help.


Jon

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
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
Stripes-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
Stripes-users Info Page - SourceForge<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to build applications. This is the appropriate place to ask for help and to report problems that ...




End of Stripes-users Digest, Vol 121, Issue 1
*********************************************
Rick Grashel
2017-05-04 18:51:51 UTC
Permalink
Hi Jon,

You cannot handle this with a currently released version of Stripes --
although it could be done with Stripes in the master branch. The only way
with a stable release of Stripes is to do something along the lines of the
example that I sent previously. You will need to have your action bean
implement a @Before(BindingAndValidation) method. Have it take the request
body, parse the JSON and then set fields on your action bean. Then, the
event handler method can function as usual.

Thanks.

-- Rick

On Wed, May 3, 2017 at 4:02 PM, Heather and Jon Turgeon <
Post by Heather and Jon Turgeon
Thanks guys, for my first question I ended up using FreeMarker which so
far is working great.
For my second question about getting a JSON Payload from a Post from a
Relay Webhook from Sparkpost . I see several examples of how to do this
with a servlet but I was hoping that Stripes could handle this. Anyone have
an idea as to if this is possible and if not any good ideas as to how to
implement? Thanks for any help.
Jon
------------------------------
*Sent:* Thursday, April 20, 2017 1:05 PM
*Subject:* Stripes-users Digest, Vol 121, Issue 1
Send Stripes-users mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/stripes-users
Stripes-users Info Page - SourceForge
<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to
build applications. This is the appropriate place to ask for help and to
report problems that ...
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Stripes-users digest..."
1. Getting the results of JSP within an Action
(Heather and Jon Turgeon)
2. Re: Getting the results of JSP within an Action (Nestor Hernandez)
3. Re: Getting the results of JSP within an Action (Rick Grashel)
4. Raw Body With ActionBean (Heather and Jon Turgeon)
----------------------------------------------------------------------
Message: 1
Date: Fri, 7 Apr 2017 06:58:15 +0000
Subject: [Stripes-users] Getting the results of JSP within an Action
namprd14.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
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
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Fri, 7 Apr 2017 07:14:27 -0500
Subject: Re: [Stripes-users] Getting the results of JSP within an
Action
mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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
Post by Heather and Jon Turgeon
to do is use an Action to get the data from the db, then do a Resolution
to
Post by Heather and Jon Turgeon
a JSP, but get the results of the resolution within the Action in the
form
Post by Heather and Jon Turgeon
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
Post by Heather and Jon Turgeon
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
Stripes-users Info Page - SourceForge
<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to
build applications. This is the appropriate place to ask for help and to
report problems that ...
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 3
Date: Fri, 7 Apr 2017 07:24:34 -0500
Subject: Re: [Stripes-users] Getting the results of JSP within an
Action
mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Agree, definitely use Velocity for this. This is exactly the kind of use
case that Velocity wad intended foe.
-- Rick
Post by Heather and Jon Turgeon
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
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
bodies written as strings (a bit of work and very messy). What I would
like
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
to do is use an Action to get the data from the db, then do a
Resolution to
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
a JSP, but get the results of the resolution within the Action in the
form
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
of a String. This way I can use JSP as an email template, grab the
result
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
and use this as the body of an email. Hopefully this is possible and
thanks
Post by Heather and Jon Turgeon
Post by Heather and Jon Turgeon
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
Stripes-users Info Page - SourceForge
<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to
build applications. This is the appropriate place to ask for help and to
report problems that ...
Post by Heather and Jon Turgeon
------------------------------------------------------------
------------------
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
Stripes-users Info Page - SourceForge
<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to
build applications. This is the appropriate place to ask for help and to
report problems that ...
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 4
Date: Thu, 20 Apr 2017 17:04:53 +0000
Subject: [Stripes-users] Raw Body With ActionBean
namprd14.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi all, I am trying to use SparkPost Relay Webhooks to accept emails, then
forward on the content to a ActionBean for processing. I have the
forwarding worked out but SparkPost is posting a "raw body" JSON object to
the ActionBean. I have never used an ActionBean like this, I usually expect
parameters with values. Anyway, is there a way for a Stripes ActionBean to
accept this? Thanks for any help.
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------
------------------
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
Stripes-users Info Page - SourceForge
<https://lists.sourceforge.net/lists/listinfo/stripes-users>
lists.sourceforge.net
Mailing list intended for all discussions related to using Stripes to
build applications. This is the appropriate place to ask for help and to
report problems that ...
End of Stripes-users Digest, Vol 121, Issue 1
*********************************************
------------------------------------------------------------
------------------
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...