Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accessing the ApplicationResources.properties values in the action class in

843840Jan 11 2008 — edited Jan 11 2008
hi ,
I have a requirement to get the value of label key , which is there in the ApplicationResources.properties file .

Let me explain with an example :-

In my Jsp i get my label like

<fmt:message key="cust.firstName"/>

In my ApplicationResources.properties file i have mapped this key to some value as :-
cust.firstName=First Name

Now my requirement is that , i want to anyhow get the ApplicationResources.properties value of the Key in my action class .
That means in the above example First Name i want to get in the action class .

Let me tell you I use Struts 2 in my application . I have tries with <s:label key="cust.firstName">. This does create a label First Name in the UI . But again i am not able to access the same in the action class (It's neither available in request parameter nor in the value stack ). Means I am not able to get the First Name label value in the action class .

Can some one provide me some guide lines how to achieve the target .

Thank you
Arunabh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2008
Added on Jan 11 2008
1 comment
271 views