RE: Struts2 resource bundle labels not showing up
I really appreciate you helping me. But, still having issues. Under resources folder - which is a source folder(getting copied to \WEB-INF\classes) I added the below files struts.properties test.properties In struts.properties struts.custom.i18n.resources=test Also, tried adding this in struts.xml struts constant name=struts.devMode value=true / constant name=struts.custom.i18n.resources value=test.properties / Both didn't work. Am I missing something? From: lukaszlen...@apache.org Date: Tue, 25 Aug 2015 15:45:48 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-25 15:34 GMT+02:00 fea jabi zy...@hotmail.com: I tried setting the default-action-ref in struts.xml as below. That didn't work. Also, I tried placing the properties in the package.properties that didn't work either. Do I need to do any setting for package.properties to work. Tried placing it within the com.xxx.actions and outside as well. package name=test_default extends=struts-default namespace=/result-types result-type name=tiles class=org.apache.struts2.views.tiles.TilesResult / /result-types default-action-ref name=login/ action name=testPortal result type=tileslogin/result /action action name=login class=com.xxx.actions.LoginAction Sorry, I meant default-class-ref not default-action-ref. And defining action like this action name=testPortal result type=tileslogin/result /action will use class from default-class-ref to create an instance of the action. And by default it's com.opensymphony.xwork2.ActionSupport so you must put properties in com/opensymphony/xwork2/ActionSupport.properties or define global properties package.properties won't work as well as LoginAction and ActionSupport are in different packages - com/xxx/actions vs com/opensymphony/xwork2 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: Struts2 resource bundle labels not showing up
2015-08-24 16:20 GMT+02:00 fea jabi zy...@hotmail.com: How to get the labels when I load the page then? I am calling the same action(login) to launch the page too. How did you configure the both actions? in struts.xml? 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: Struts2 resource bundle labels not showing up
Thanks, for all the help. I got this working. All I had to do was redeploy and re-launch the application. Then global properties worked fine. From: zy...@hotmail.com To: user@struts.apache.org Subject: RE: Struts2 resource bundle labels not showing up Date: Tue, 25 Aug 2015 10:19:07 -0400 I really appreciate you helping me. But, still having issues. Under resources folder - which is a source folder(getting copied to \WEB-INF\classes) I added the below files struts.properties test.properties In struts.properties struts.custom.i18n.resources=test Also, tried adding this in struts.xml struts constant name=struts.devMode value=true / constant name=struts.custom.i18n.resources value=test.properties / Both didn't work. Am I missing something? From: lukaszlen...@apache.org Date: Tue, 25 Aug 2015 15:45:48 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-25 15:34 GMT+02:00 fea jabi zy...@hotmail.com: I tried setting the default-action-ref in struts.xml as below. That didn't work. Also, I tried placing the properties in the package.properties that didn't work either. Do I need to do any setting for package.properties to work. Tried placing it within the com.xxx.actions and outside as well. package name=test_default extends=struts-default namespace=/result-types result-type name=tiles class=org.apache.struts2.views.tiles.TilesResult / /result-types default-action-ref name=login/ action name=testPortal result type=tileslogin/result /action action name=login class=com.xxx.actions.LoginAction Sorry, I meant default-class-ref not default-action-ref. And defining action like this action name=testPortal result type=tileslogin/result /action will use class from default-class-ref to create an instance of the action. And by default it's com.opensymphony.xwork2.ActionSupport so you must put properties in com/opensymphony/xwork2/ActionSupport.properties or define global properties package.properties won't work as well as LoginAction and ActionSupport are in different packages - com/xxx/actions vs com/opensymphony/xwork2 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: Struts2 resource bundle labels not showing up
Need help with this please. From: zy...@hotmail.com To: user@struts.apache.org Subject: RE: Struts2 resource bundle labels not showing up Date: Mon, 24 Aug 2015 10:20:41 -0400 Thanks,, for trying to help me on this. yes, in the properties file I do have the line breaks as label.user=User label.password=Password After submitting the login form with wrong user/pass I am seeing the labels. you are right on this. Didn't realize that until now. How to get the labels when I load the page then? I am calling the same action(login) to launch the page too. From: lukaszlen...@apache.org Date: Mon, 24 Aug 2015 15:24:47 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-21 8:17 GMT+02:00 fea jabi zy...@hotmail.com: Using struts2 in iRad 1. In src folder have package com.xyx.actions in this have LoginAction.java 2. Created resources -- of type Source Folder in it I added a package com.xyx.actions in this added LoginAction.properties I added couple of label and error properties in it. 3. In LoginAction - validate method is handling errors and adding the key from LoginAction.properties file and on field error in jsp the value from properties file is read and displaying in jsp correctly. i.e error messages are showing correct from th properties file. 4. In the same properties file, I added label properties like label.user=Userlabel.password=Passwordbtn.login=Login errors.user.required=Please enter usererrors.password.required=Please enter password The jsp is not getting the label properties and displaying the key itself as label.user s:label key=label.loginInfo/ s:textfield name=user key=label.user/s:textfield s:submit key=btn.login align=center cssClass=button/s:submit what is that I am missing? How to fix this? Any help on this appreciated. Thanks. What action do you use to display the login form? And after submitting the login form with wrong user/pass do you see the labels? 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: Struts2 resource bundle labels not showing up
Sorry, here is my Struts.xml. Thanks, for trying to help me. Struts.xml action name=testPortal result type=tileslogin/result /action action name=login class=com.xxx.actions.LoginAction result name=success type=tileshome/result result name=notAuthorized type=tilesnotAuthorized/result result name=input type=tileslogin/result /action URL I am using to lauch is http://localhost:9080/Test/testPortal.action Do I need to create and have the properties set in the TestPortalAction.properties too?? Do I need to have same properties in both TestPortalAction.properties and LoginAction.properties as well?? From: lukaszlen...@apache.org Date: Tue, 25 Aug 2015 14:46:24 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-25 14:41 GMT+02:00 fea jabi zy...@hotmail.com: Need help with this please. Sure but can you answer my question I have sent you 6 hours ago? 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: Struts2 resource bundle labels not showing up
2015-08-25 14:50 GMT+02:00 fea jabi zy...@hotmail.com: Sorry, here is my Struts.xml. Thanks, for trying to help me. Struts.xml action name=testPortal result type=tileslogin/result /action So I assume that's your login form input action from where you start. If so this doesn't use LoginAction but ActionSupport - it's a default action defined with default-action-ref [1] in struts-default.xml. You can override that in struts.xml or define other more common global properties [2] [1] https://struts.apache.org/docs/action-configuration.html#ActionConfiguration-ActionDefault [2] http://struts.apache.org/docs/localization.html 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: Struts2 resource bundle labels not showing up
2015-08-25 14:41 GMT+02:00 fea jabi zy...@hotmail.com: Need help with this please. Sure but can you answer my question I have sent you 6 hours ago? 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: Struts2 resource bundle labels not showing up
I tried setting the default-action-ref in struts.xml as below. That didn't work. Also, I tried placing the properties in the package.properties that didn't work either. Do I need to do any setting for package.properties to work. Tried placing it within the com.xxx.actions and outside as well. package name=test_default extends=struts-default namespace=/result-types result-type name=tiles class=org.apache.struts2.views.tiles.TilesResult / /result-types default-action-ref name=login/ action name=testPortal result type=tileslogin/result /action action name=login class=com.xxx.actions.LoginAction From: lukaszlen...@apache.org Date: Tue, 25 Aug 2015 15:00:34 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-25 14:50 GMT+02:00 fea jabi zy...@hotmail.com: Sorry, here is my Struts.xml. Thanks, for trying to help me. Struts.xml action name=testPortal result type=tileslogin/result /action So I assume that's your login form input action from where you start. If so this doesn't use LoginAction but ActionSupport - it's a default action defined with default-action-ref [1] in struts-default.xml. You can override that in struts.xml or define other more common global properties [2] [1] https://struts.apache.org/docs/action-configuration.html#ActionConfiguration-ActionDefault [2] http://struts.apache.org/docs/localization.html 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: Struts2 resource bundle labels not showing up
2015-08-25 15:34 GMT+02:00 fea jabi zy...@hotmail.com: I tried setting the default-action-ref in struts.xml as below. That didn't work. Also, I tried placing the properties in the package.properties that didn't work either. Do I need to do any setting for package.properties to work. Tried placing it within the com.xxx.actions and outside as well. package name=test_default extends=struts-default namespace=/result-types result-type name=tiles class=org.apache.struts2.views.tiles.TilesResult / /result-types default-action-ref name=login/ action name=testPortal result type=tileslogin/result /action action name=login class=com.xxx.actions.LoginAction Sorry, I meant default-class-ref not default-action-ref. And defining action like this action name=testPortal result type=tileslogin/result /action will use class from default-class-ref to create an instance of the action. And by default it's com.opensymphony.xwork2.ActionSupport so you must put properties in com/opensymphony/xwork2/ActionSupport.properties or define global properties package.properties won't work as well as LoginAction and ActionSupport are in different packages - com/xxx/actions vs com/opensymphony/xwork2 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: Struts2 resource bundle labels not showing up
any reason why you are not supplying line breaks between key1=value1key2=value2 in properties file: label.user=Userlabel.password=Password instead of: label.user=User label.password=Password ? Martin From: zy...@hotmail.com To: user@struts.apache.org Subject: Struts2 resource bundle labels not showing up Date: Mon, 24 Aug 2015 08:24:54 -0400 Still need help with this please. From: zy...@hotmail.com To: user@struts.apache.org Subject: Struts2 resource bundle labels not showing up Date: Fri, 21 Aug 2015 02:17:08 -0400 Using struts2 in iRad 1. In src folder have package com.xyx.actions in this have LoginAction.java 2. Created resources -- of type Source Folder in it I added a package com.xyx.actions in this added LoginAction.properties I added couple of label and error properties in it. 3. In LoginAction - validate method is handling errors and adding the key from LoginAction.properties file and on field error in jsp the value from properties file is read and displaying in jsp correctly. i.e error messages are showing correct from th properties file. 4. In the same properties file, I added label properties like label.user=Userlabel.password=Passwordbtn.login=Login errors.user.required=Please enter usererrors.password.required=Please enter password The jsp is not getting the label properties and displaying the key itself as label.user s:label key=label.loginInfo/ s:textfield name=user key=label.user/s:textfield s:submit key=btn.login align=center cssClass=button/s:submit what is that I am missing? How to fix this? Any help on this appreciated. Thanks.
Re: Struts2 resource bundle labels not showing up
2015-08-21 8:17 GMT+02:00 fea jabi zy...@hotmail.com: Using struts2 in iRad 1. In src folder have package com.xyx.actions in this have LoginAction.java 2. Created resources -- of type Source Folder in it I added a package com.xyx.actions in this added LoginAction.properties I added couple of label and error properties in it. 3. In LoginAction - validate method is handling errors and adding the key from LoginAction.properties file and on field error in jsp the value from properties file is read and displaying in jsp correctly. i.e error messages are showing correct from th properties file. 4. In the same properties file, I added label properties like label.user=Userlabel.password=Passwordbtn.login=Login errors.user.required=Please enter usererrors.password.required=Please enter password The jsp is not getting the label properties and displaying the key itself as label.user s:label key=label.loginInfo/ s:textfield name=user key=label.user/s:textfield s:submit key=btn.login align=center cssClass=button/s:submit what is that I am missing? How to fix this? Any help on this appreciated. Thanks. What action do you use to display the login form? And after submitting the login form with wrong user/pass do you see the labels? 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: Struts2 resource bundle labels not showing up
Thanks,, for trying to help me on this. yes, in the properties file I do have the line breaks as label.user=User label.password=Password After submitting the login form with wrong user/pass I am seeing the labels. you are right on this. Didn't realize that until now. How to get the labels when I load the page then? I am calling the same action(login) to launch the page too. From: lukaszlen...@apache.org Date: Mon, 24 Aug 2015 15:24:47 +0200 Subject: Re: Struts2 resource bundle labels not showing up To: user@struts.apache.org 2015-08-21 8:17 GMT+02:00 fea jabi zy...@hotmail.com: Using struts2 in iRad 1. In src folder have package com.xyx.actions in this have LoginAction.java 2. Created resources -- of type Source Folder in it I added a package com.xyx.actions in this added LoginAction.properties I added couple of label and error properties in it. 3. In LoginAction - validate method is handling errors and adding the key from LoginAction.properties file and on field error in jsp the value from properties file is read and displaying in jsp correctly. i.e error messages are showing correct from th properties file. 4. In the same properties file, I added label properties like label.user=Userlabel.password=Passwordbtn.login=Login errors.user.required=Please enter usererrors.password.required=Please enter password The jsp is not getting the label properties and displaying the key itself as label.user s:label key=label.loginInfo/ s:textfield name=user key=label.user/s:textfield s:submit key=btn.login align=center cssClass=button/s:submit what is that I am missing? How to fix this? Any help on this appreciated. Thanks. What action do you use to display the login form? And after submitting the login form with wrong user/pass do you see the labels? 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