Re: struts.xml - change default location

2007-03-28 Thread doktora

I think the fact that you cannot change the location of struts.xml should be
put in here:

http://struts.apache.org/2.x/docs/struts-1-solutions.html

This will help out a lot of people who do not expect s2 to have this
different behaviour. I failed to find this documented anywhere which cost me
quite a bit of time and frustration with s2 because I couldn't even
jumpstart it.



Ted Husted-4 wrote:
 
 Struts 2 uses a different approach to loading the configuration. The
 initial struts.xml is loaded from the root of the classpath. The
 easiest way to set that up is to put the struts.xml under the classes
 folder. The boostrap struts.xml can then load whatever other
 struts.xml's you would like using the include element.
 
 HTH, Ted
  http://www.husted.com/ted/blog/
 
 
 On 3/27/07, doktora [EMAIL PROTECTED] wrote:

 Why is it that putting this in the FilterDispatcher filter section in
 web.xml breaks Sturts2:

 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts.xml/param-value
 /init-param

 It looks to me as if this makes S2 confused about the whereabouts of its
 other struts-default.xml, etc. files.


 doktora


 Ted Husted-4 wrote:
 
  Put a stub struts.xml on the classpath that loads your working
  configuration from another location. If the stub is under classes and
  the one you want is under WEB-INF, try
 
  struts
  include file=..\struts.xml/
  /struts
 
  -HTH, Ted
   http://www.husted.com/ted/blog/
 
  On 3/19/07, Bartek [EMAIL PROTECTED] wrote:
 
  Hi
 
  I have to face up the following issue. My location of struts.xml
 shoudl
  be
  WEB-INF directory, not WEB-INF/classes.
  What is the easiest way to achieve this?? I tried several different
  config
  locations (e.g. WEB-INF/struts.xml) for
 StrutsXmlConfigurationProvider,
  none
  of them worked. Creating custom configuration provider might help, but
 it
  is
  pojo by default , protocol independant and therefore without any
  ServletContext access - what is a pain in this case.
 
  Cheers
  bartek
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9718423
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-28 Thread Manu Mahajan

I second this.

And thanks for the replies.

doktora wrote:

I think the fact that you cannot change the location of struts.xml should be
put in here:

http://struts.apache.org/2.x/docs/struts-1-solutions.html

This will help out a lot of people who do not expect s2 to have this
different behaviour. I failed to find this documented anywhere which cost me
quite a bit of time and frustration with s2 because I couldn't even
jumpstart it.



Ted Husted-4 wrote:
  

Struts 2 uses a different approach to loading the configuration. The
initial struts.xml is loaded from the root of the classpath. The
easiest way to set that up is to put the struts.xml under the classes
folder. The boostrap struts.xml can then load whatever other
struts.xml's you would like using the include element.

HTH, Ted
 http://www.husted.com/ted/blog/


On 3/27/07, doktora [EMAIL PROTECTED] wrote:


Why is it that putting this in the FilterDispatcher filter section in
web.xml breaks Sturts2:

init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts.xml/param-value
/init-param

It looks to me as if this makes S2 confused about the whereabouts of its
other struts-default.xml, etc. files.


doktora


Ted Husted-4 wrote:
  

Put a stub struts.xml on the classpath that loads your working
configuration from another location. If the stub is under classes and
the one you want is under WEB-INF, try

struts
include file=..\struts.xml/
/struts

-HTH, Ted
 http://www.husted.com/ted/blog/

On 3/19/07, Bartek [EMAIL PROTECTED] wrote:


Hi

I have to face up the following issue. My location of struts.xml
  

shoudl
  

be
WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different
config
locations (e.g. WEB-INF/struts.xml) for
  

StrutsXmlConfigurationProvider,
  

none
of them worked. Creating custom configuration provider might help, but
  

it
  

is
pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case.

Cheers
bartek
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


Re: struts.xml - change default location

2007-03-28 Thread Ted Husted

Done.

You can also add comments directly to the page.

-T.

On 3/28/07, doktora [EMAIL PROTECTED] wrote:


I think the fact that you cannot change the location of struts.xml should be
put in here:

http://struts.apache.org/2.x/docs/struts-1-solutions.html

This will help out a lot of people who do not expect s2 to have this
different behaviour. I failed to find this documented anywhere which cost me
quite a bit of time and frustration with s2 because I couldn't even
jumpstart it.



Ted Husted-4 wrote:

 Struts 2 uses a different approach to loading the configuration. The
 initial struts.xml is loaded from the root of the classpath. The
 easiest way to set that up is to put the struts.xml under the classes
 folder. The boostrap struts.xml can then load whatever other
 struts.xml's you would like using the include element.

 HTH, Ted
  http://www.husted.com/ted/blog/


 On 3/27/07, doktora [EMAIL PROTECTED] wrote:

 Why is it that putting this in the FilterDispatcher filter section in
 web.xml breaks Sturts2:

 init-param
   param-nameconfig/param-name
   param-value/WEB-INF/struts.xml/param-value
 /init-param

 It looks to me as if this makes S2 confused about the whereabouts of its
 other struts-default.xml, etc. files.


 doktora


 Ted Husted-4 wrote:
 
  Put a stub struts.xml on the classpath that loads your working
  configuration from another location. If the stub is under classes and
  the one you want is under WEB-INF, try
 
  struts
  include file=..\struts.xml/
  /struts
 
  -HTH, Ted
   http://www.husted.com/ted/blog/
 
  On 3/19/07, Bartek [EMAIL PROTECTED] wrote:
 
  Hi
 
  I have to face up the following issue. My location of struts.xml
 shoudl
  be
  WEB-INF directory, not WEB-INF/classes.
  What is the easiest way to achieve this?? I tried several different
  config
  locations (e.g. WEB-INF/struts.xml) for
 StrutsXmlConfigurationProvider,
  none
  of them worked. Creating custom configuration provider might help, but
 it
  is
  pojo by default , protocol independant and therefore without any
  ServletContext access - what is a pain in this case.
 
  Cheers
  bartek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-27 Thread doktora

Why is it that putting this in the FilterDispatcher filter section in
web.xml breaks Sturts2:

init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts.xml/param-value
/init-param

It looks to me as if this makes S2 confused about the whereabouts of its
other struts-default.xml, etc. files.


doktora


Ted Husted-4 wrote:
 
 Put a stub struts.xml on the classpath that loads your working
 configuration from another location. If the stub is under classes and
 the one you want is under WEB-INF, try
 
 struts
 include file=..\struts.xml/
 /struts
 
 -HTH, Ted
  http://www.husted.com/ted/blog/
 
 On 3/19/07, Bartek [EMAIL PROTECTED] wrote:

 Hi

 I have to face up the following issue. My location of struts.xml shoudl
 be
 WEB-INF directory, not WEB-INF/classes.
 What is the easiest way to achieve this?? I tried several different
 config
 locations (e.g. WEB-INF/struts.xml) for StrutsXmlConfigurationProvider,
 none
 of them worked. Creating custom configuration provider might help, but it
 is
 pojo by default , protocol independant and therefore without any
 ServletContext access - what is a pain in this case.

 Cheers
 bartek
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9696987
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-27 Thread Ted Husted

Struts 2 uses a different approach to loading the configuration. The
initial struts.xml is loaded from the root of the classpath. The
easiest way to set that up is to put the struts.xml under the classes
folder. The boostrap struts.xml can then load whatever other
struts.xml's you would like using the include element.

HTH, Ted
http://www.husted.com/ted/blog/


On 3/27/07, doktora [EMAIL PROTECTED] wrote:


Why is it that putting this in the FilterDispatcher filter section in
web.xml breaks Sturts2:

init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts.xml/param-value
/init-param

It looks to me as if this makes S2 confused about the whereabouts of its
other struts-default.xml, etc. files.


doktora


Ted Husted-4 wrote:

 Put a stub struts.xml on the classpath that loads your working
 configuration from another location. If the stub is under classes and
 the one you want is under WEB-INF, try

 struts
 include file=..\struts.xml/
 /struts

 -HTH, Ted
  http://www.husted.com/ted/blog/

 On 3/19/07, Bartek [EMAIL PROTECTED] wrote:

 Hi

 I have to face up the following issue. My location of struts.xml shoudl
 be
 WEB-INF directory, not WEB-INF/classes.
 What is the easiest way to achieve this?? I tried several different
 config
 locations (e.g. WEB-INF/struts.xml) for StrutsXmlConfigurationProvider,
 none
 of them worked. Creating custom configuration provider might help, but it
 is
 pojo by default , protocol independant and therefore without any
 ServletContext access - what is a pain in this case.

 Cheers
 bartek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-23 Thread Ted Husted

Put a stub struts.xml on the classpath that loads your working
configuration from another location. If the stub is under classes and
the one you want is under WEB-INF, try

struts
   include file=..\struts.xml/
/struts

-HTH, Ted
http://www.husted.com/ted/blog/

On 3/19/07, Bartek [EMAIL PROTECTED] wrote:


Hi

I have to face up the following issue. My location of struts.xml shoudl be
WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different config
locations (e.g. WEB-INF/struts.xml) for StrutsXmlConfigurationProvider, none
of them worked. Creating custom configuration provider might help, but it is
pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case.

Cheers
bartek


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-20 Thread Bartek

Hi James

Well, the person who created the project structure is not me. I just have to
fit my development into it.
So the discussion if this makes sense or not is not the point of this topic
:). 
But nerevtheless, thank you for confirming what I have also supposed (and
what you called a battle).
Thanks again.!!

Regards
Bartek


James Mitchell-3 wrote:
 
 I don't understand why it has to be loaded from outside the  
 classpath.  There are facilities in place to let you do what you  
 want, but  you would be fighting an uphill battle.
 
 I don't see the justification for changing code to simplify this.   
 Please help me understand why you have to have your struts  
 configuration in WEB-INF and not in WEB-INF/classes (or jar).
 
 
 --
 James Mitchell
 The Ruby Roundup
 http://www.rubyroundup.com/
 
 
 On Mar 19, 2007, at 8:14 AM, Bartek wrote:
 

 Hi James

 Well, the default location of struts.xml is classpath location e.g.
 WEB-INF/classes. And I want to load it from outside the classpath,  
 e.g.
 directly from WEB-INF directory. How can I do this? I thought , I  
 coudl do
 this as in case of struts1 - using param-nameconfig/param-name of
 actionservlet. Of course in case of struts2 I would use this init  
 param in
 context of FilterDispatcher. But it did not work. So again, the  
 question is:
 How to load the struts.xml from WEB-INF directory, without adding  
 it to
 classpath?

 bartek


 James Mitchell-3 wrote:

 Can you restate your question?


 --
 James Mitchell
 The Ruby Roundup
 http://www.rubyroundup.com/


 On Mar 19, 2007, at 5:21 AM, Bartek wrote:


 Hi

 I have to face up the following issue. My location of struts.xml
 shoudl be
 WEB-INF directory, not WEB-INF/classes.
 What is the easiest way to achieve this?? I tried several different
 config
 locations (e.g. WEB-INF/struts.xml) for
 StrutsXmlConfigurationProvider, none
 of them worked. Creating custom configuration provider might help,
 but it is
 pojo by default , protocol independant and therefore without any
 ServletContext access - what is a pain in this case.

 Cheers
 bartek

 -- 
 View this message in context: http://www.nabble.com/struts.xml---
 change-default-location-tf3425865.html#a9548614
 Sent from the Struts - User mailing list archive at Nabble.com.


  
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -- 
 View this message in context: http://www.nabble.com/struts.xml--- 
 change-default-location-tf3425865.html#a9550834
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9567920
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



struts.xml - change default location

2007-03-19 Thread Bartek

Hi

I have to face up the following issue. My location of struts.xml shoudl be
WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different config
locations (e.g. WEB-INF/struts.xml) for StrutsXmlConfigurationProvider, none
of them worked. Creating custom configuration provider might help, but it is
pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case. 

Cheers
bartek

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9548614
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-19 Thread James Mitchell

Can you restate your question?


--
James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 19, 2007, at 5:21 AM, Bartek wrote:



Hi

I have to face up the following issue. My location of struts.xml  
shoudl be

WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different  
config
locations (e.g. WEB-INF/struts.xml) for  
StrutsXmlConfigurationProvider, none
of them worked. Creating custom configuration provider might help,  
but it is

pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case.

Cheers
bartek

--
View this message in context: http://www.nabble.com/struts.xml--- 
change-default-location-tf3425865.html#a9548614

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-19 Thread Bartek

Hi James

Well, the default location of struts.xml is classpath location e.g.
WEB-INF/classes. And I want to load it from outside the classpath, e.g.
directly from WEB-INF directory. How can I do this? I thought , I coudl do
this as in case of struts1 - using param-nameconfig/param-name of
actionservlet. Of course in case of struts2 I would use this init param in
context of FilterDispatcher. But it did not work. So again, the question is:
How to load the struts.xml from WEB-INF directory, without adding it to
classpath?

bartek


James Mitchell-3 wrote:
 
 Can you restate your question?
 
 
 --
 James Mitchell
 The Ruby Roundup
 http://www.rubyroundup.com/
 
 
 On Mar 19, 2007, at 5:21 AM, Bartek wrote:
 

 Hi

 I have to face up the following issue. My location of struts.xml  
 shoudl be
 WEB-INF directory, not WEB-INF/classes.
 What is the easiest way to achieve this?? I tried several different  
 config
 locations (e.g. WEB-INF/struts.xml) for  
 StrutsXmlConfigurationProvider, none
 of them worked. Creating custom configuration provider might help,  
 but it is
 pojo by default , protocol independant and therefore without any
 ServletContext access - what is a pain in this case.

 Cheers
 bartek

 -- 
 View this message in context: http://www.nabble.com/struts.xml--- 
 change-default-location-tf3425865.html#a9548614
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9550834
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts.xml - change default location

2007-03-19 Thread James Mitchell
I don't understand why it has to be loaded from outside the  
classpath.  There are facilities in place to let you do what you  
want, but  you would be fighting an uphill battle.


I don't see the justification for changing code to simplify this.   
Please help me understand why you have to have your struts  
configuration in WEB-INF and not in WEB-INF/classes (or jar).



--
James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 19, 2007, at 8:14 AM, Bartek wrote:



Hi James

Well, the default location of struts.xml is classpath location e.g.
WEB-INF/classes. And I want to load it from outside the classpath,  
e.g.
directly from WEB-INF directory. How can I do this? I thought , I  
coudl do

this as in case of struts1 - using param-nameconfig/param-name of
actionservlet. Of course in case of struts2 I would use this init  
param in
context of FilterDispatcher. But it did not work. So again, the  
question is:
How to load the struts.xml from WEB-INF directory, without adding  
it to

classpath?

bartek


James Mitchell-3 wrote:


Can you restate your question?


--
James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 19, 2007, at 5:21 AM, Bartek wrote:



Hi

I have to face up the following issue. My location of struts.xml
shoudl be
WEB-INF directory, not WEB-INF/classes.
What is the easiest way to achieve this?? I tried several different
config
locations (e.g. WEB-INF/struts.xml) for
StrutsXmlConfigurationProvider, none
of them worked. Creating custom configuration provider might help,
but it is
pojo by default , protocol independant and therefore without any
ServletContext access - what is a pain in this case.

Cheers
bartek

--
View this message in context: http://www.nabble.com/struts.xml---
change-default-location-tf3425865.html#a9548614
Sent from the Struts - User mailing list archive at Nabble.com.


 
-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context: http://www.nabble.com/struts.xml--- 
change-default-location-tf3425865.html#a9550834

Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]