Wednesday, October 28, 2009

Creating the Property File













Creating the Property File

The online discussion forum application uses a property file to store the path to the XML files of the application. The following code shows the path.properties property file of the application:



userlistpath=c:/Chp7/code/xml/userlist.xml
discussionlistpath=c:/Chp7/code /xml/discussionlist.xml
uslistpath=c:/Chp7/code/xml/uslist.xml
francelistpath=c:/Chp7/code/xml/francelist.xml

The above code contains the following properties:




  • userlistpath: Stores the path to the userlist.xml file.




  • discussionistpath: Stores the path to the discussionlist.xml file.




  • uslistpath: Stores the path to the uslist.xml file.




  • francelistpath: Stores the path to the francelist.xml file.








Note�

The property values in the path.properties file specify the path to the XML files of the application. If you store the XML files in some other location, you need to change the property values to specify the new path of the XML files.












No comments: