You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Phil Rice <ph...@conformNow.com> on 2002/03/07 22:21:15 UTC

Newbie question. Can action mappings intercept requests that are not part of forms?

The problem:
I am trying to make a "logout" button work by proving a link:

<html:link page="/logout">
  <bean:message key="mainMenu.logout" />
</html:link>

Things I have tried
I have tried a number of variations of the following part of
struts-config.xml:

    <action    path="/logout"
               type="com.conformNow.calibrate.actions.LogoutAction"
               name="logoutForm"
              scope="request">
      <forward name="success"              path="/Welcome.jsp"/>
    </action>

When I try and use the link above, the address browser of the browser shows
"/logout" as the last part of the url and LogoutAction is not executed.
I have managed to get LogoutAction to execute by creating a form, and
submitting the form.
I have fairly sure this is not a simple capitalisation problem
I have looked in the FAQ and the mailing archives.

Summary
Is there a way to intercept a hypertext link, rather than a post?

Thanks

Phil Rice