Strange? I would have thought this was a fairly commonly needed feature and the code in ServletUrlRenderer has a lot of hoops to jump through to make something seemingly simple work. Thanks for your help, I guess I'll just have to hard code it for now. (*Chris*)
On Wed, Jan 7, 2009 at 5:46 AM, Musachy Barroso <musa...@gmail.com> wrote: > 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 <thechrispr...@gmail.com> > wrote: > > Is there a right way to do it? > > (*Chris*) > > > > On Tue, Jan 6, 2009 at 5:24 PM, Musachy Barroso <musa...@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 <thechrispr...@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-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >