struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen, Daniel" <Daniel.Al...@kbcfp.com>
Subject Extending interceptor stacks
Date Thu, 21 Feb 2008 22:26:59 GMT
Is there a way to have one interceptor stack defined in terms of
another? I created a log-in interceptor to check if a user is logged in
and redirect him/her to the log-in page if not, and it will be applied
to almost all pages, but there will be a few (index, etc.) that would
not need that. However, most other pages use the same basic
interceptors, just not the log-in one. So, given the below, is there a
way to change it so that it's two stacks, one missing the log-in, and
the other only declaring its parent and adding the log-in?

	<interceptor-stack name="defaultLoginStack">
          <interceptor-ref name="params" />
          <interceptor-ref name="login" />
          <interceptor-ref name="prepare" />
          <interceptor-ref name="fileUpload" />
          <interceptor-ref name="conversionError" />
          <interceptor-ref name="validation" />
	</interceptor-stack>


I'm guessing it's not, since I didn't see anything that seemed likely in
the struts.xml documentation page,[1] but I thought I'd ask and make
sure, or find out if there's some non-XML way of doing an equivalent.
(Or possibly if there's a reason I shouldn't be doing this in the first
place?)

Thanks,
~Dan Allen

[1]http://struts.apache.org/2.x/docs/strutsxml-examples.html

-- 
This message may contain confidential, proprietary, or legally privileged information. No
confidentiality or privilege is waived by any transmission to an unintended recipient. If
you are not an intended recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those of any entity within
the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC
FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell,
any financial product. Any prices or other values included in this message are indicative
only, and do not necessarily represent current market prices, prices at which KBC FP would
enter into a transaction, or prices at which similar transactions may be carried on KBC FP's
own books. The information contained in this message is provided "as is", without representations
or warranties, express or implied, of any kind. Past performance is not indicative of future
returns.


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


Mime
View raw message