Action chaining not forwarding ModelDriven model properties

2018-02-28 Thread shahzad . ismail
Hi,
I'm migrating an app from Struts 1 to Struts 2 (Tomcat v8 and Struts 2.5.14.1). 
There is a scenario in which mapping goes like:
jsp1 --> action1 --> action2 --> action3 --> jsp2

So it must be type="chain" for action1 --> action2 and action2 --> action3 as I 
need to pass ModelDriven model as well as some action member variables, some of 
them are non-strings. All 3 actions are chaining to different methods of the 
same action class.  
The **problem** is that action1 --> action2 is passing action variables but not 
passing any properties of model even though action2 --> action3 is passing all 
the action variables as well as model properties.  
I'm only using defaultStack of interceptor.  
My interceptors are defined as:  





true
DEBUG
dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*






And I'm using them as:  


 
*
insert
*
insert

kmList_actionmethod2
kmList_actionmethod3

actionmethod1, actionmethod2, actionmethod3



I've debugged it a bit and able to figure out that, initially, at the start of 
action1, request.getParamater("modelprop") is null then I set modelprop in the 
action1 method which makes mymodel.modelprop == "something" and 
request.getAttribute("modelprop") == "something" but the 
request.getParameter("modelprop") remains null by the end of action1 method. So 
when it chains to action2 method, it simply rewrites 
request.getParameter("modelprop") value, which is *null*, back to both, 
request.getAttribute("modelprop") and mymodel.modelprop. Am I messing up with 
some interceptor configuration?
I've tried it with type="redirectAction" and the problem of not passing 
mymodel.modelprop from action1 to action2 remains.
Any suggestions would be appreciated.

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



About "Parameter Validation Filter"

2018-02-28 Thread Emi

Hello,

There is a topic about Parameter Validation Filter 
(TrimTextValidationRule, FailIfNotCanonicalizedValidationRule, 
FailIfContainsHTMLValidationRule) for servlet 
(https://www.owasp.org/index.php/Parameter_Validation_Filter).


I just want to know that struts2.5.14.1 already have these kinds of 
validation set by default and no need to add pvf.xml anymore, right?


Thanks a lot.