You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sami Dalouche <sk...@free.fr> on 2007/05/27 19:10:05 UTC

Struts2 : create URLs programmatically

Hi,

In order to generate some emails (and other similar things), I would
need to output the URL of some Struts2 actions.

Of course, the URLs depend on the chosen ActionMapper, and I'd like my
generated URLs to be compliant with the configured ActionMapper.

The Component class seems to contain the "determineActionUrl" method,
that would fit my needs, but it is protected, so I guess the right way
to determine an Action URL is something different...

So, can anyone tell me how to achieve that using the Public API of
Struts2 ?

If it is not possible, I can always copy the few methods on which
determineActionUrl() depends, but it needs an ActionmMapper instance
that is normally @Inject'ed. How am I supposed to fetch this instance ?

Thanks for your help,
Sami Dalouche


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