| Author |
How to access the packages.properties file in JSP with theme=simple Struts 2
|
dhanaraj krishnasamy
Greenhorn
Joined: Jan 07, 2009
Posts: 4
|
|
Hai
I am working with struts2
In that i want Access the properties file in JSP through theme="Simple". But it Works with theme="css_xhtml"
The code is follows
packages.properties
Login.password=${getText(fieldName)} is required
signup.password = Password
signup.username = User Name
signup.confirmpassword= Comfirmation Password
signup.email=Email
signup.landline=Landline Number
signup.mobile=Mobile Number
signup.industry=Industry
signup.role=Role
signup.upload=File Upload
index.jsp
"<s:password name="password" key="signup.password" theme="simple"/> "
But it doest display the label in the display.
so any one help to slove this problem.
Thanks ...
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
Hi,
This problem is not because of your them="simple" tag in your code.
There is another way to use this.
<s:password name="password" key="%{getText('signup.password')}" theme="simple"/>
try this if still you not getting your value try this
<s:password name="password" key="getText('signup.password')" theme="simple"/>
and make sure your package.property file be in Action Package.
|
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
If you want to use lable then divide your <s:passord filed.
First will display your message :- ><s:text name="signup.password" />
Second for your input type password :- <s:password name="password" theme="simple"/>
I am using like this.
this is perfectly working at my side. so, use like this.
|
 |
 |
|
|
subject: How to access the packages.properties file in JSP with theme=simple Struts 2
|
|
|