struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fea jabi <zy...@hotmail.com>
Subject RE: Struts2 resource bundle labels not showing up
Date Tue, 25 Aug 2015 12:41:57 GMT
Need help with this please.
 
> From: zyxrm@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: lukaszlenart@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 <zyxrm@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-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> > 
>  		 	   		  
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message