You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Rocks <ro...@hotmail.com> on 2009/05/17 12:19:02 UTC

I have removed struts-default.xml so why do I get it's Interceptors stack??

Hi,

 

I wanted to cut down to the minumim interceptors so I removed my references to struts-default, by setting struts.configuration.files invarious places, documentation confilcts quite a bit

 

<constant name="struts.configuration.files" value="struts.xml"/>  in struts.xml

struts.configuration.files=struts.xml in struts.properties

 

and even tried in web.xml

 

<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>struts.configuration.files</param-name>
<param-value>struts.xml</param-value>
</init-param> 
</filter>

 

becasue it was mentioned in a bug report  https://issues.apache.org/struts/browse/WW-1966

 

But i still get all 18 of the defaultStack interceptors being called even though I have created my own stack and called 

 

<default-interceptor-ref name="football"/>  in the struts.xml for the package, also extends="" is set for the package. My own stack gets ignored.

 

Is there something I am doing wrong?

 

struts version 2.1.6

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

RE: I have removed struts-default.xml so why do I get it's Interceptors stack??

Posted by David Rocks <ro...@hotmail.com>.
Solved this, It is the convention plugin again, I am using an eclipse dynamic web project and I knew that it scans the source to look for actions which I never bothered using as they are already defined in the struts.xml.

 

The struts.xml worked OK until I upgraded from 2.0.11 to 2.1.6 an placed the convention plugin in.

 

Now what it seems to be doing is searching all the directories under my project and picking up the classes directory, and when it grabs that it ignores my struts.xml file and picks up the struts-default.xml file.

 

The anser is to set struts.convention.package.locators.disable to false.

 

When I eventually do get all this REST stuff sorted I will do a write up for the WIKI as promised, I am just still getting issues.

 

david

 
> Date: Sun, 17 May 2009 09:42:24 -0400
> From: newton.dave@yahoo.com
> To: user@struts.apache.org
> Subject: Re: I have removed struts-default.xml so why do I get it's Interceptors stack??
> 
> David Rocks wrote:
> > But i still get all 18 of the defaultStack interceptors being called
> > even though I have created my own stack and called
> > <default-interceptor-ref name="football"/> in the struts.xml for the
> > package, also extends="" is set for the package. My own stack gets
> > ignored.
> > 
> > Is there something I am doing wrong?
> 
> Most likely, since defining and using custom interceptor stacks works
> fine. Curiously, you didn't include the configuration you're trying to
> use, so I'm not quite sure how to help.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Re: I have removed struts-default.xml so why do I get it's Interceptors stack??

Posted by Dave Newton <ne...@yahoo.com>.
David Rocks wrote:
> But i still get all 18 of the defaultStack interceptors being called
> even though I have created my own stack and called
> <default-interceptor-ref name="football"/>  in the struts.xml for the
> package, also extends="" is set for the package. My own stack gets
> ignored.
> 
> Is there something I am doing wrong?

Most likely, since defining and using custom interceptor stacks works
fine. Curiously, you didn't include the configuration you're trying to
use, so I'm not quite sure how to help.

Dave


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