File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to read properties file in struts 2 action class

 
zimbu bolleddu
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I'm new to struts 2.0, please help me while reading input from .properties file.

And one more thing how to distinguish two or more properties files which are having same sort of strings.

code examples are highly appreciated.

Thanks & Regards,
Zimbu
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please choose an appropriate forum for your questions.Asking questions in an unrelated forum yields fewer and less useful response. Read this for more information.
 
vanlalhmangaiha khiangte
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Check Properties .. this will make it easier ..

Hope this helps ..
 
Sam Tsang
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just put the properties file in the package and use getText("property name"), then you can get the strings from the particular property name. But remember the properties file should be in the same package as your action class.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

by mistake post reply here... Sorry
 
Ana Julia Fontoura
Greenhorn
Posts: 1
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to use "getText()" or another method like this, but placing the .properties file inside another package?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic