struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mads Riise Rasmussen (JIRA)" <>
Subject [jira] Updated: (WW-1817) A tag <global-interceptor-refs> in <package> is a feature I seem to miss
Date Fri, 16 Mar 2007 08:49:51 GMT


Mads Riise Rasmussen updated WW-1817:

default-interceptor-ref does somehow fulfill my need some of the way, but not when I have
an action which differ from the default-interceptor-ref. For instance it needs paramsPrepareParamsStack
instead of basicStack. But if I still want to use a specific interceptor for all actions in
the package (fx. if I want to authenticate all action in package in the same way) I may have
to specify it again for the action that differs. This explanation may sound a bit creepy but
let my add a piece of xml below. This is the way I have to do it know - what I would like
to do is to set the package-user interceptor-stack in a new tag <global-interceptor-refs>
and let the <default-interceptor-ref> contain basicStack or defaultStack and then only
specify in this case paramsPrepareParamsStack in the to actions where it is used (Hopefully
this makes a bit of sense =0) and it is only a suggestion of an improvement which would make
the xml look better):

<package name="user" namespace="/user" extends="struts-default">
    <interceptor name="authenticate"
      <interceptor-stack name="package-user">
        <interceptor-ref name="authenticate">
          <param name="accessType">2</param>
    <action name="list" class="com.softscan.service.controller.user.UserListAction" >
      <interceptor-ref name="package-user" />
      <interceptor-ref name="basicStack" />
    <action name="create" >
      <interceptor-ref name="package-user" />
    <action name="edit" class="com.softscan.service.controller.user.UserEditAction">
      <interceptor-ref name="package-user" />
      <interceptor-ref name="paramsPrepareParamsStack"/>
    <action name="save" class="com.softscan.service.controller.user.UserSaveAction">
      <interceptor-ref name="package-user" />
      <interceptor-ref name="paramsPrepareParamsStack"/>
      <result name="input">/user/user_edit.jsp</result>
      <result type="redirect-action" >list</result>

> A tag <global-interceptor-refs> in <package> is a feature I seem to miss
> ------------------------------------------------------------------------
>                 Key: WW-1817
>                 URL:
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Actions
>    Affects Versions: Future
>            Reporter: Mads Riise Rasmussen
>            Priority: Trivial
> I think it could be nice with a new sub element in <package> fx. named <global-interceptor-refs>
where you could specify the interceptors which should be executed for all action in the given
package. Only reason for this is that I don't have to put an <interceptor-ref> in all
actions. I guess if it makes sense to have a <global-results> tag it whould also make
sense to have a <global-interceptor-refs> tag. Cheers! 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message