Read the section on the config file elements in struts.xml on the
Struts2 docs site. Also read the Interceptors guide[1].
You have to specify the interceptor stack on the action. You can use
the element to specify what stack to use by
default.
And what you've defined is not an intercepto
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:
i can't simply a
thanks,
but i definide in struts my interceptors in this way:
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 tha
2009/5/21 Paweł Wielgus :
> global forward
thanks,
but i definide in struts my interceptors in this way:
in order to use the interceptors only when namespace is /admin/*
but the interceptor is never called!
ideas?
thanks
--
Stefano
Hi Stefano,
use global forward.
Best greetings,
Paweł Wielgus.
2009/5/21 Stefano Tranquillini :
> I've some problem with filter.
> so i'll try with interceptor.
>
> i've done something like that:
>
> public String intercept(ActionInvocation invocation) throws Exception {
> Map session = A
I've some problem with filter.
so i'll try with interceptor.
i've done something like that:
public String intercept(ActionInvocation invocation) throws Exception {
Map session = ActionContext.getContext().getSession();
Object o = session.get("logged");
boolean ret = false;
You need to include elements in your filter mappings for
the Struts filter.
eg.
struts2
/*
REQUEST
FORWARD
With no element specified, the container assumes you mean
the filter chain only gets applied to requests.
The FORWARD element means the filter cha
now is taked. but i've some problem with the dispacer.
i've an action mapped in this way:
denied
namespace is /
if i manually put in this url:
http://localhost:8080//WAP-Shop-war/denied.action its WORKS.
the filter, else branch is this:
else {
RequestDisp
Put the mapping for the admin filter above the struts2 filter. Filters
are invoked in the order in web.xml, first to last.
The struts filter is catching the request first and dispatching it
before it ever reaches the admin filter.
On 20 May 2009, at 09:37, Stefano Tranquillini wrote:
Hi a
Hi all.
i need to block the path /admin/ for all the pepole. only the people
logged in as root can access it.
i've done a filter, but struts seems to dosen't works with its
struts2
org.apache.struts2.dispatcher.FilterDispatcher
adminFilter
filter.Admi
10 matches
Mail list logo