• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to access the packages.properties file in JSP with theme=simple Struts 2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ...
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nishan Patel
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic