Big problem folks.
i already have an interceptor form the ejb.
so i need to use both of these interceptors.

i've to update the DEFAULT PACKAGE in this way:

<interceptors>
            <interceptor name="ejb3"
class="com.opensymphony.xwork2.ejb3plugin.InjectEJBInterceptor"></interceptor>
            <interceptor name="adminLogin" class="interceptors.AdminLogin"/>
            <interceptor-stack name="new.stack">
                 <interceptor-ref name="adminLogin" />
                <interceptor-ref name="ejb3" />
                <interceptor-ref name="defaultStack" />
            </interceptor-stack>
        </interceptors>

        <default-interceptor-ref name="new.stack" />

i can't simply add the interceptor in the package admin and set
default-interceptor at my LoginInterceptor, because otherwise the ejb3
interceptor is not called!

well, now the adminLogin is always called. but how can i check if the
action is in the namespace /admin?

or, i can put the interceptor in package /admin and adding this
interceptor at new.stack?

2009/5/21 Stefano Tranquillini <stefano.tranquill...@gmail.com>:
> thanks,
>
> but i definide in struts my interceptors in this way:
>
>  <package name="admin" extends="default" namespace="/admin">
>       <interceptors>
>           <interceptor name="adminLogin" class="interceptors.AdminLogin"/>
>       </interceptors>
>
> in order to use the interceptors only when namespace is /admin/*
>
> but the interceptor is never called!
>
> And:
>
>
> where i've to put the globalforward?
> i putted a the end of the sturts.xml
>
> something like that
>
>  <global-forwards>
>        <forward name="denied" path="/deniedShow.action"/>
>    </global-forwards>
>
> has to be inside package or something else?
>
> the error is:
>
> 2009-05-21 16:56:51,171 ERROR [com.opensymphony.xwork2.util.DomHelper]
> (HDScanner) Element type "global-forwards" must be declared. at
> (null:92:22)
> org.xml.sax.SAXParseException: Element type "global-forwards" must be 
> declared.
>
>
>
> 2009/5/21 Stefano <elste...@gmail.com>:
>> 2009/5/21 Paweł Wielgus <poulw...@gmail.com>:
>>> global forward
>>
>> thanks,
>>
>> but i definide in struts my interceptors in this way:
>>
>>  <package name="admin" extends="default" namespace="/admin">
>>        <interceptors>
>>            <interceptor name="adminLogin" class="interceptors.AdminLogin"/>
>>        </interceptors>
>>
>> in order to use the interceptors only when namespace is /admin/*
>>
>> but the interceptor is never called!
>>
>> ideas?
>>
>> thanks
>>
>> --
>> Stefano
>>
>
>
>
> --
> Stefano
>



-- 
Stefano

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

Reply via email to