This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Launch my own class before tomcat server loading the struts property file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Launch my own class before tomcat server loading the struts property file" Watch "Launch my own class before tomcat server loading the struts property file" New topic
Author

Launch my own class before tomcat server loading the struts property file

Manju Na
Greenhorn

Joined: Aug 18, 2011
Posts: 11
Hi
Is it possible to launch my own class before tomcat server loading the struts property file. I have tried using Servlet App Event Listeners. In the listener class, can able to update my struts property file. But when the app starts, it is not taking updated property file in to the picture. So is there any way for this.


Thanks in Advance.
Manju
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 489
    
    5
What are you trying to achieve by updating the property (struts-config?) file?
Updating a configuration file may be one (possibly kludgy) way of achieving whatever the goal is, but there may be better ways we can suggest, if you can tell us what it is.
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Hi Manju I didn't understand what do you want to do? explain it.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Manju Na
Greenhorn

Joined: Aug 18, 2011
Posts: 11
Hi all, Sorry if my question is not proper.
my question is : Is it possible to launch my own class before server loading all the message property files into the memory. I have tried using Servlet App Event Listeners.Through this class, we can monitor the Tomcat server starting from the method contextInitialized() and closing from the method contextDestroyed(). But
this class will be called after server loading all the message property files into the memory. So is there any way to launch my own class before loading all the message property files into the memory.

Thanks
Manju

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Launch my own class before tomcat server loading the struts property file
 
Similar Threads
Tomcat NoClassDefFoundError + LifecycleException
Tomcat is refusing to load servlet.jar. Why??
NX: RandomAccessFile - "rw", "rwd"
reloading property files after tomcat has started.
Java and activeX ?