Re: Block accessing in some path with filter.

2009-05-21 Thread Andy Sykes
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

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano Tranquillini
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

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano Tranquillini
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

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano
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

Re: Block accessing in some path with filter.

2009-05-21 Thread Paweł Wielgus
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

Re: Block accessing in some path with filter.

2009-05-21 Thread 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 = ActionContext.getContext().getSession(); Object o = session.get("logged"); boolean ret = false;

Re: Block accessing in some path with filter.

2009-05-20 Thread Andy Sykes
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

Re: Block accessing in some path with filter.

2009-05-20 Thread Stefano Tranquillini
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

Re: Block accessing in some path with filter.

2009-05-20 Thread Andy Sykes
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

Block accessing in some path with filter.

2009-05-20 Thread Stefano Tranquillini
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