Are you interesting in tomcat itself or in your webapp?
If later is the case you can simply write a ContextListener:
public class TimestampContextListener implements ServletContextListener{
private static long startTimestamp;
public void contextDestroyed(ServletContextEvent event) {
}
public void contextInitialized(ServletContextEvent event) {
startTimestamp = System.currentTimeMillis();
}
public long getStartTimestamp(){ return startTimestamp; }
}
alternatively you could put the very same timestamp into
servletContext (application scope) in the init() method of one of your
servlets.
regards
Leon
On 1/6/07, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> From: cifroes [mailto:[EMAIL PROTECTED]
> Subject: timestamp of tomcat startup?
>
> Is there a easy way to get this timestamp without modifying tomcat
> source code?
The message is logged by org/apache/catalina/startup/Catalina.java, but
it does not appear to save the time value anywhere. I suppose you could
scan the log, looking for that particular message, but that's not
exactly an elegant solution.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]