I have upgraged my struts from 2.0.11.1 to 2.0.14 and my app crashes in the 
following case:

I have an action as follows:

<action name="routeAdmin" class="ccol.action.admin.Administration">
     <param name="validRoles">CCOL administrator,Queue administrator</param>
     <param name="tabId">addRouting</param>
     <result name="success">routingAdminPage</result>
</action>  

I have an interceptor that retrieves validRoles and if the logged-in user does 
not have any of the specified roles, then access is denied (much like the 
"roles" in struts 1). However, in my actions I do not have a property named 
"validRoles" defined. Upto to before upgrading to 2.0.14, it seems 
StaticParametersInterceptor would ignore if no property was defined. But now It 
throws an exception as follows:

Error setting expression 'validRoles' with value 'Agent,CCOL 
administrator,Queue administrator' Error setting expression 'validRoles' with 
value 'Agent,CCOL administrator,Queue administrator' - [unknown location] at 
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:191) 
at 
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:166) 
at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:97)
 at 

I can get around the issue by having a BaseAction class with 'validRoles' 
property and make all other action extend it but I was wondering if there is 
anyother way that I can have my app working ,as it used to work with 2.0.11.1, 
without making any changes.


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.


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

Reply via email to