File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes user data/constant stored in xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "user data/constant stored in xml file" Watch "user data/constant stored in xml file" New topic
Author

user data/constant stored in xml file

Ningfeng Xu
Greenhorn

Joined: Jan 22, 2002
Posts: 18
I am looking at the Jakarta Commons Configuration. It is nice to do some application specific data configuration in XML file using this package. But each time when I need a constant stored in XML file, I have the following code:

XMLConfiguration config = new XMLConfiguration("tables.xml");
int rowsPerPage = config.getInt("rowsPerPage");

I suppose this code will be executed every time when needed, loading the file and parsing the integer. Does struts or tomcat have some builtin solution for user-level data? like they have(struts-config.xml,web.xml) for their data. Thanks.


SCJP2
 
 
subject: user data/constant stored in xml file
 
Similar Threads
XMLConfiguration in window and mac
XML to HTML
Can I access the value of a listKey in <s:select> from my Action Class?
Keeping user preferences for that page after periodic page refresh for multiple browsers / PC
Dynamic XML file.