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 <
tashiba40_evergr...@hotmail.com> wrote:

> 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-requ...@lists.sourceforge.net <
> stripes-users-requ...@lists.sourceforge.net>
> *Sent:* Thursday, April 20, 2017 1:05 PM
> *To:* stripes-users@lists.sourceforge.net
> *Subject:* Stripes-users Digest, Vol 121, Issue 1
>
> Send Stripes-users mailing list submissions to
>         stripes-users@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-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>         stripes-users-ow...@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 <tashiba40_evergr...@hotmail.com>
> Subject: [Stripes-users] Getting the results of JSP within an Action
> To: "stripes-users@lists.sourceforge.net"
>         <stripes-users@lists.sourceforge.net>
> Message-ID:
>         <DM3PR14MB09698EC6461E08C92B2161D68F0C0@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 <ilu...@gmail.com>
> Subject: Re: [Stripes-users] Getting the results of JSP within an
>         Action
> To: Stripes Users List <stripes-users@lists.sourceforge.net>
> Message-ID:
>         <CAMsyVL+YL8WxB_Jq_67Jozm+age3bHe5hB8HrjvTEyfN_2+13Q@
> 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 <
> tashiba40_evergr...@hotmail.com>:
>
> > 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
> > Stripes-users@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 ...
>
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 3
> Date: Fri, 7 Apr 2017 07:24:34 -0500
> From: Rick Grashel <rgras...@gmail.com>
> Subject: Re: [Stripes-users] Getting the results of JSP within an
>         Action
> To: Stripes Users List <stripes-users@lists.sourceforge.net>
> Message-ID:
>         <CADoNxeM4HsHUVs-bSbAUxpom-8ONZwtB_zWo6toPNDvon_zsrw@
> 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
>
> On Apr 7, 2017 7:15 AM, "Nestor Hernandez" <ilu...@gmail.com> 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 <
> > tashiba40_evergr...@hotmail.com>:
> >
> >> 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
> >> Stripes-users@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 ...
>
> >>
> >>
> >
> > ------------------------------------------------------------
> > ------------------
> > 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-users@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 ...
>
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Thu, 20 Apr 2017 17:04:53 +0000
> From: Heather and Jon Turgeon <tashiba40_evergr...@hotmail.com>
> Subject: [Stripes-users] Raw Body With ActionBean
> To: "stripes-users@lists.sourceforge.net"
>         <stripes-users@lists.sourceforge.net>
> Message-ID:
>         <DM3PR14MB0969FF0099EDC790F27AD17A8F1B0@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-users@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
> *********************************************
>
> ------------------------------------------------------------
> ------------------
> 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-users@lists.sourceforge.net
> 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
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to