You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Lane, Ron " <ro...@citi.com> on 2007/08/30 19:45:04 UTC

Can you specify the name of struts.xml for Struts2?

We're having a problem with Struts2 running under Jrun.
The 'web application class loader' in Jrun is not finding struts.xml in
WEB-INF/classes.
We can put struts.xml in the overall classpath of the Java application
server, but then that means only one per Java app server.  

1. Has anyone else experienced this problem and have a solution or
workaround?
2. In Struts-1, one could specify a name of the struts config file - is
there a way in web.xml to specify an alternative name of struts.xml?
That way each of the web apps can specify its unique name, and even
though all the config files are in the overall classpath, they can be
unique per web app by having a unique name.

Ron Lane

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


RE: Can you specify the name of struts.xml for Struts2?

Posted by James Holmes <ja...@jamesholmes.com>.
If you find things that are documented to work and don't, please open JIRA
issues and we'll get them fixed.

James

-----Original Message-----
From: mraible [mailto:matt@raibledesigns.com] 
Sent: Thursday, August 30, 2007 4:37 PM
To: user@struts.apache.org
Subject: Re: Can you specify the name of struts.xml for Struts2?


It looks like the FilterDispatcher supports a "config" init-parameter as
well. However, I tried setting it to /WEB-INF/struts.xml and it didn't work
for me.

http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatc
her/FilterDispatcher.html

Matt


Zarar Siddiqi wrote:
> 
> The struts.configuration.files property in struts.properties at the
> root of your classpath can specify struts configuration files using a
> comma separated list, by default this property is set to:
> 
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml
> 
> You can change it if you like.
> 
> Zarar
> 
> On 8/30/07, Lane, Ron <ro...@citi.com> wrote:
>> We're having a problem with Struts2 running under Jrun.
>> The 'web application class loader' in Jrun is not finding struts.xml in
>> WEB-INF/classes.
>> We can put struts.xml in the overall classpath of the Java application
>> server, but then that means only one per Java app server.
>>
>> 1. Has anyone else experienced this problem and have a solution or
>> workaround?
>> 2. In Struts-1, one could specify a name of the struts config file - is
>> there a way in web.xml to specify an alternative name of struts.xml?
>> That way each of the web apps can specify its unique name, and even
>> though all the config files are in the overall classpath, they can be
>> unique per web app by having a unique name.
>>
>> Ron Lane
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Can-you-specify-the-name-of-struts.xml-for-Struts2--tf
4355855.html#a12415685
Sent from the Struts - User mailing list archive at Nabble.com.


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


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


Re: Can you specify the name of struts.xml for Struts2?

Posted by mraible <ma...@raibledesigns.com>.
It looks like the FilterDispatcher supports a "config" init-parameter as
well. However, I tried setting it to /WEB-INF/struts.xml and it didn't work
for me.

http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html

Matt


Zarar Siddiqi wrote:
> 
> The struts.configuration.files property in struts.properties at the
> root of your classpath can specify struts configuration files using a
> comma separated list, by default this property is set to:
> 
> struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml
> 
> You can change it if you like.
> 
> Zarar
> 
> On 8/30/07, Lane, Ron <ro...@citi.com> wrote:
>> We're having a problem with Struts2 running under Jrun.
>> The 'web application class loader' in Jrun is not finding struts.xml in
>> WEB-INF/classes.
>> We can put struts.xml in the overall classpath of the Java application
>> server, but then that means only one per Java app server.
>>
>> 1. Has anyone else experienced this problem and have a solution or
>> workaround?
>> 2. In Struts-1, one could specify a name of the struts config file - is
>> there a way in web.xml to specify an alternative name of struts.xml?
>> That way each of the web apps can specify its unique name, and even
>> though all the config files are in the overall classpath, they can be
>> unique per web app by having a unique name.
>>
>> Ron Lane
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Can-you-specify-the-name-of-struts.xml-for-Struts2--tf4355855.html#a12415685
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Can you specify the name of struts.xml for Struts2?

Posted by Zarar Siddiqi <za...@gmail.com>.
The struts.configuration.files property in struts.properties at the
root of your classpath can specify struts configuration files using a
comma separated list, by default this property is set to:

struts.configuration.files=struts-default.xml,struts-plugin.xml,struts.xml

You can change it if you like.

Zarar

On 8/30/07, Lane, Ron <ro...@citi.com> wrote:
> We're having a problem with Struts2 running under Jrun.
> The 'web application class loader' in Jrun is not finding struts.xml in
> WEB-INF/classes.
> We can put struts.xml in the overall classpath of the Java application
> server, but then that means only one per Java app server.
>
> 1. Has anyone else experienced this problem and have a solution or
> workaround?
> 2. In Struts-1, one could specify a name of the struts config file - is
> there a way in web.xml to specify an alternative name of struts.xml?
> That way each of the web apps can specify its unique name, and even
> though all the config files are in the overall classpath, they can be
> unique per web app by having a unique name.
>
> Ron Lane
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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