load-on-startup servlet needs access

2005-03-06 Thread Darren Govoni
Hi, I wasn't able to do a full text search of archive message bodies on this, so pardons if its old problem. I have a servlet that I designate to load-on-startup, but that servlet calls a class that needs to access the tomcat server to get resources. It just hangs because the server is not ready

Re: load-on-startup servlet needs access

2005-03-06 Thread Tim Funk
If you are performing a http request during init() - you are out of luck. If you need to load resources (plain old files) - you can use ServletContext.getResourceAsStream() -Tim Darren Govoni wrote: Hi, I wasn't able to do a full text search of archive message bodies on this, so pardons if its

Re: load-on-startup servlet needs access

2005-03-06 Thread Darren Govoni
Darn it. Thanks anyway. Well, I think it makes a lot of sense to delay loading some servlets until AFTER the server is up and running. Maybe soon we will see such an operation. maybe? load-on-startup-100/load-on-startup On Sun, 2005-03-06 at 10:00 -0500, Tim Funk wrote: If you are

Re: load-on-startup servlet needs access

2005-03-06 Thread Shankar Unni
Darren Govoni wrote: How can I have my servlet loaded on startup, but after the web server is up and running? Not possible? Well, you can always start a thread that does this initialization, and return. Then, when the full Tomcat initialization is complete, your thread will run to completion