struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Struts Wiki] Update of "HowToReadAnXMLFileForEachUserRequest" by MichaelJouravlev
Date Thu, 16 Feb 2006 22:52:09 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/HowToReadAnXMLFileForEachUserRequest

The comment on the change is:
Orphaned; offtopic (question posted to wiki instead of mailing list)

------------------------------------------------------------------------------
- Describe HowToReadAnXMLFileForEachUserRequest here.
+ deleted
  
- 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
- 
- //MyActionServlet.java
- 
- init()
- {
- //perform initialization()
- super.init()
- }
- 
- process()
- {
- //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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message