You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Daniell <pa...@mm.st> on 2005/05/09 01:10:37 UTC

Injecting actions globally

I have an application which has some actions which require 
authentication and some which do not. When moving between a page that 
doesn't require authentication to one that does, I'd like to "inject" a 
login form page. Upon authentication, a session identifier is placed in 
a client-side cookie. Subsequently I'd like to return the user to the 
original, requested action. 

Is there a standard pattern to do this in Struts 1.2? I found this 
response from Craig M.  ( 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01812.html )
from January 2001, which suggests that in Struts 1.0 you ought to 
subclass ActionServlet. But he also says that future versions might 
alter this behavior. Is this still the standard way to get such 
behavior. Perhaps I am being overly academic, but it seems like 
modifying the ActionServlet means penetrating deep into the framework to 
do work that ought to be able to accomplished merely through 
actionmappings and forwards.

Any suggestions are sincerely appreciated,
Paul

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