Then when is the code running? In the inbound or outbound? Sitemesh works because it is activated on the outbound, and so should your filter. If inbound, then it won't, because the action proxy hasn't been called yet.
Don On Dec 17, 2007 4:10 PM, Dale Newfield <[EMAIL PROTECTED]> wrote: > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

