struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Lindholm <glindh...@yahoo.com>
Subject Re: Getting an URL for an Action
Date Thu, 08 Jan 2009 17:02:04 GMT

I have a similar use case which I think would be very common:
It's the "forgot password" case.
When a user has forgotten there password and wants it reset 
we send them an email with a URL link to the reset action that includes 
the security parameters.
We have to construct (i.e. hack together) the URL in an action.

It would be nice it there was a helper utility to do this.


Chris Pratt wrote:
> 
> Basically, I have some tried and true tag libraries for generating pretty,
> MIME Emails that work great with Struts.  They support all manner of
> attachments and have worked great for years.  Occasionally I need to
> attach
> something (in this case a PDF) that is generated by another action.  So
> the
> main action needs to have a property that returns a list of things to be
> attached, which in this case is a URL to the Action that generates the
> dynamic PDF.
> 
> I'm sure there's a way to refactor all this into some unrecognizable form,
> but this is tried and true, supports JSP and Tiles including properly
> formatted, pretty HTML and plain text MIME emails, and really I can't see
> any reason that this should be precluded from working with any system that
> supports JSP Tag Libraries.
> 
> Can you see a better way to get the generated attachment into the email?
>   (*Chris*)
> 
> On Wed, Jan 7, 2009 at 9:23 AM, Dave Newton <newton.dave@yahoo.com> wrote:
> 
>> Chris Pratt wrote:
>>
>>> Strange?  I would have thought this was a fairly commonly needed feature
>>>
>>
>> I've never needed to generate a URL from an action name within another
>> action across a half-dozen S2 apps--it can't be *that* common... I think
>> the
>> most hackish thing I've done like that is to use an action name as a
>> dynamic
>> result parameter for a "redirectAction" result type.
>>
>> IMO actions should "never" generate a URL since they're supposed to be
>> decoupled from the underlying action access mechanism. What's your use
>> case
>> that this solves?
>>
>> Dave
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Getting-an-URL-for-an-Action-tp21322853p21355940.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message