Don Brown wrote:
I'm accessing this from a listener (LoginListener) that is trying to
generate i18ized messages of the form "Last successful login at X, N
unsuccessful login attempts since then."  Is the ActionContext null
because I've not yet been dispatched to an action?  What is the
appropriate way now to do getText() lookups from a listener?

Ah, yeah, I should change those javadocs.  Now, ActionContext can be
null, unless it is during an action execution (basically everything
behind the ActionProxy).  Therefore, the listener approach won't work,
unless you put it between the s2 filter and the s2 cleanup filter,
similar to how sitemesh is configured.

The filter-mapping for securityFilter (acegisecurity) is in between struts-cleanup and struts. This "LoginListener" listener handles events triggered within the securityFilter (onApplicationEvent), so doesn't that mean I'm already doing what you suggest? Wait--am I backwards? My filter-mappings (and filters) start with struts-cleanup (org.apache.struts2.dispatcher.ActionContextCleanUp) and ends with struts (org.apache.struts2.dispatcher.FilterDispatcher), with everything else in between (including securityFilter and siteMesh). Wouldn't I be having all sorts of problems (for example, with struts tags in my sitemesh decorators) if I had that backwards?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to