sorry for poping this again. Any thoughts on this? :)

tm jee <[EMAIL PROTECTED]> wrote: forgotten some stuff in previous post.

xwork-default.xml wouldn't be loaded is we are using Struts2, just that with 
this approach there's 2 files to maintain whenever we introduce new beans etc. 
(one in struts-default.xml and another in xwork.xml)

Or we could use
 
in struts-default.xml, but that would require us to refactor out commons stuff 
from struts-default.xml plus the disadvantage Don pointed out.

I'd prefer the first approach, declare the xwork related beans in 
xwork-default.xml, since xwork-default.xml already have interceptors etc that 
are duplicated in struts-default.xml.

Thoughts?

rgds

tm jee  wrote: 
I see. What about duplicating those beans in xwork-default.xml, it is still 
going to be in struts-default.xml as well.

Just such that those who use xwork standalone could do

// the will load xwork-default.xml and all the beans required during injection
configurationManager.addConfigurationProvider(new 
XmlConfigurationProvider(xwork-default.xml));

// this will load xwork.xml where custom beans, action, interceptor etc resides
configurationManager.addConfigurationProvider(new XmlConfigurationProvider());

This is such that xwork standalone user does need to add those bean manually in 
their xwork.xml which would need understnading of xwork code base.

Thoughts?

rgds

Don Brown  wrote: I thought about that, however, there are two advantages to 
keeping 
everything in struts-default.xml:

 1. Default implementations for extension points can be named "struts" 
universally.  Otherwise, we'd have to allow two, xwork and struts, or 
choose a third option.

 2. Easier for a new developer to see how struts configures itself.  
Since we publicize the struts-default, struts-plugin, struts.xml load 
order, it is less confusing to not have the additional hidden 
xwork-default.xml

I'm open to changing this if there are other good options on the table.

Don

tm jee wrote:
> Hi guys, 
>
> Shouldn't we have the xwork stuff in xwork-default.xml? In struts-default.xml,
>
> There's some common beans like 
>
>     
>     
>     
>     
>     
>     ...
>
> 
>     
>     
>
> ..
> 
>
> that might be better if moved to xwork-default.xml Am I missing somthing?
>
> rgds    
>
>     
>
>
>
>  Send instant messages to your online friends http://uk.messenger.yahoo.com 
>   


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



 Send instant messages to your online friends http://uk.messenger.yahoo.com 

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

Reply via email to