AuthenticatedAction

Some actions, such as for instance updating a users profile, should be done in context of a logged in user.

This action is an abstract superclass which ensures that a user is logged in before being able to perform the requested task. Subclasses needs to implement one method, performAuthenticated , to take advantage of user authentication.

The action ensures that the user is logged in before invoking the abstract method performAuthenticated which performs the requested action.

The abstract method performAuthenticated obeys the same contract as Action#execute.

Struts config
<action path="/doSomeThingAuthenticated"
  type="com.escenic.profile.presentation.struts.AuthenticatedAction"
  name="SomeForm"
  input="/doSomeThingAuthenticated-input.jsp"
  validate="true">

  <forward name="success"
           path="/doSomeThingAuthenticated-success.jsp"/>
</action>
Action Forwards

input page

not-logged-in if the user was not logged in

success

If user is autenticated.