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 18:28:59 GMT
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: zyxrm@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: lukaszlenart@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 <zyxrm@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="tiles">login</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="tiles">login</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-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