Re: exclude params submit

2018-01-03 Thread Lukasz Lenart
2018-01-03 9:47 GMT+01:00 José Antonio Delgado Trujillo :
> But it must fix with exclude param
> https://struts.apache.org/getting-started/exclude-parameters.html 
> 

No, you don't have to, as Yasser said, this happens only in devMode.
Once disabled, Struts will ignore missing setters/parameters. Maybe we
should use a better error message.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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



Re: exclude params submit

2018-01-03 Thread José Antonio Delgado Trujillo
But it must fix with exclude param
 
https://struts.apache.org/getting-started/exclude-parameters.html 



> On 3 Jan 2018, at 05:48, Yasser Zamani  wrote:
> 
> 
> 
> On 1/2/2018 10:38 PM, José Antonio Delgado Trujillo wrote:
>> So  produces the next error:
>> 18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught 
>> setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error 
>> setting expression 'submit' with value ['Acceder', ]
> 
> When there is no setter for given parameter name, a warning message like 
> above will be logged in devMode. Thus is expected behaviour to allow 
> developer to spot missing setter or typo in either parameter name or 
> setter. You can simply ignore this one and if all such warning logs were 
> ok, set struts.devMode to false to disable this message when you deploy 
> to production.
> 
> Hope this helps.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org



Re: exclude params submit

2018-01-02 Thread Yasser Zamani


On 1/2/2018 10:38 PM, José Antonio Delgado Trujillo wrote:
> So  produces the next error:
> 18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught 
> setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error 
> setting expression 'submit' with value ['Acceder', ]

When there is no setter for given parameter name, a warning message like 
above will be logged in devMode. Thus is expected behaviour to allow 
developer to spot missing setter or typo in either parameter name or 
setter. You can simply ignore this one and if all such warning logs were 
ok, set struts.devMode to false to disable this message when you deploy 
to production.

Hope this helps.


exclude params submit

2018-01-02 Thread José Antonio Delgado Trujillo
I have a form with several tags using the attribute key.

As it is said in getting started / message resource file
Key is used to substitute tag’s value and label attributes.

For example: 

To put the tag label Struts2 look for property file.
To put the tag value Struts2 look for setName of a bean person instantiated by 
the action class.

So  produces the next error:
18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught 
setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error 
setting expression 'submit' with value ['Acceder', ]

To avoid this in getting started / elude params say to configure a new stack 
filter with exclude params.


I have the next Form
——





——


This is my properties file
—
credentialBean.user=Usuario
credentialBean.pass=Contraseña
submit=Acceder

—

This is my trusts.xml configuration
—





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






...
—

Still i’ve got submit error.
What am i doing wrong?


Un saludo,
José A.