struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Struts2 resource bundle labels not showing up
Date Tue, 25 Aug 2015 13:45:48 GMT
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
View raw message