struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: Getting an URL for an Action
Date Wed, 07 Jan 2009 13:46:58 GMT
hum, there is no right way after all. If you end up using UrlHelper,
take a look at how it is used in ServletUrlRenderer:renderFormUrl,
different methods are used depending on whether an action mapping was
found or not.

musachy

On Wed, Jan 7, 2009 at 12:00 AM, Chris Pratt <thechrispratt@gmail.com> wrote:
> Is there a right way to do it?
>  (*Chris*)
>
> On Tue, Jan 6, 2009 at 5:24 PM, Musachy Barroso <musachy@gmail.com> wrote:
>
>> I wouldn't advise you to use UrlHelper, given that Struts 2 doesn't
>> have an API, that class can change without warning (it does from time
>> to time)
>>
>> musachy
>>
>> On Tue, Jan 6, 2009 at 7:56 PM, Chris Pratt <thechrispratt@gmail.com>
>> wrote:
>> > I'm trying to turn an action name into an URL from within another action.
>> > I've tried:
>> >
>> > UrlHelper.buildUrl("action-name",request,response,null)
>> >
>> > Which seems to just return "action-name".  And I've tried:
>> >
>> > UrlHelper.buildUrl("/action-name",request,response,null)
>> >
>> > Which returns "/context/action-name", which is a little closer, but still
>> > isn't the full, working URL.
>> >
>> > What am I missing?
>> >  (*Chris*)
>> >
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Mime
View raw message