struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Apache Struts Wiki] New: HowToReadAnXMLFileForEachUserRequest
Date Wed, 23 Jun 2004 03:32:01 GMT
   Date: 2004-06-22T20:32:01
   Editor: ManCha <>
   Wiki: Apache Struts Wiki
   Page: HowToReadAnXMLFileForEachUserRequest

   no comment

New Page:

Describe HowToReadAnXMLFileForEachUserRequest here.

I want to read a a large XML config file for each request that comes to the ActionServlet.
The system we have now is we have a customized ActionServlet. And I am instantiating myXmlClass
in the process method. And I call a method called myXmlClassObject.getXMLAttributeFor the
current Action class. 
What is the recommended way to do this.

Currently my code look like this


//perform initialization()

//do stuff
instantiate myXmlClass (which has a _saxparser.parse() method)

myXmlClassObject.getMyAttribute()//some data base calls underneath it for some logging stuff
//do stuff

Should I make a static object of myXmlClass in my actionServlet. 
Should I put myXmlClass into session, and check for each request whether this object exists
in session, if not create it.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message