--- "Allen, Daniel" <[EMAIL PROTECTED]> wrote: > Is there a way to prevent the validation from firing unless the user is > coming back to it after attempting to log in?
By default the validation interceptor won't check a set of action methods, including the "input" method. The easiest thing, IMO, is to create an action mapping for the action that specifies the method. One way to avoid creating an additional XML mapping is to use wildcarding. > struts.xml excerpt: > <action name="login" class="loginAction"> <!-- class is > instantiated by Spring, hence no qualified classname --> Declaring the action as a spring bean is optional, depending on how you're wiring things, but I'm guessing you already knew that one. > <result name="input">/jsp/login.jsp</result> > <result > name="success">/jsp/redirect.jsp</result> If everything is behind S2 then this is an un-necessary complication, but I don't know how your app is set up. Just FYI. > @SuppressWarnings("unchecked") > public class LoginAction extends ActionSupport implements > ValidationAware, Validateable, SessionAware { FYI, ActionSupport already implements ValidationAware and Validateable. > private String userName = null; "null" is the default, uninitialized value for member variables. > if(redirectDesintation == null || Spelling :p Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]