Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To Access struts Properties file

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends, am new to struts.I read that " you can store variables in xml file(properties file) and for future enhancements we just call properties file . Now i want to implement this , where can i call properties file to enhance my application. My question is where this properties file will be called.
 
Jer Deras
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
specify in the build.xml file

<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="src" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
</javac>
<copy file="src/struts.xml" todir="${webinf.dir}/classes"/>
<copy file="src/struts.properties" todir="${webinf.dir}/classes"/>
<copy file="src/jbpm.cfg.xml" todir="${webinf.dir}/classes"/>
<copy file="src/jbpm.hibernate.cfg.xml" todir="${webinf.dir}/classes"/>
</target>

and have your struts.properties file in source folder
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Rajendra: what types of properties are you going to use? Which version of Struts?
 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends, I read in the net "we can use properties file for future enhancements. for example you can change your application from english to some other language " . I have no idea , what is actually stored in properties file. can you tell me for struts 2.0 Version . Also please tell file extension of properties file. Explain complete details about properties file.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you searched the web? Properties files end in ".properties". This is standard Java I18N. For Struts 2-specific information see here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic