It's not a secret anymore!*
The moose likes Tomcat and the fly likes How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT)" Watch "How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT)" New topic
Author

How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT)

pedro abs
Ranch Hand

Joined: Mar 25, 2010
Posts: 33
How can I verify the ocurrence of <load-on-startup> Servlet?
Which log "<tomcat installation>/log" I have to search for verify that some servlet configured with <load-on-startup>1</load-on-startup> has been loaded?
Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 212
pedro abs wrote:How can I verify the ocurrence of <load-on-startup> Servlet?
Which log "<tomcat installation>/log" I have to search for verify that some servlet configured with <load-on-startup>1</load-on-startup> has been loaded?


Why do you need to know that? Just incase you are still curious to know, then you can use ServletContext.log inside your servlet code and you can check the servlet loaded on the server startup.


Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

That depends upon how you have logging set up. Generally, logs get written to catalina.out.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pedro abs
Ranch Hand

Joined: Mar 25, 2010
Posts: 33
Ok, thank you very much !!! I put ServletContex.log("...") in the init() method and I can see it !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT)
 
Similar Threads
URL Mapping : Default Servlet
Cannot Run Servlet
web.xml autorun
Problems calling servlet at startup
Can i run a servlet on tomcat startup?