Re: Is this an 'ok' way to setup commonly used collections??
"Rick Reumann" <[email protected]> Mon, 12 May 2003 00:44:34 -0400
| Newsgroups | gmane.comp.java.mvc.devel |
|---|---|
| Organization | baseBeans Engineering |
| Message-ID | <[email protected]> |
On Mon, 12 May 2003 00:14:55 -0400, Rick Reumann wrote:
> The SetupServlet looks like this:
>
> public class SetupServlet extends HttpServlet {
> rotected static Log log = LogFactory.getLog(SetupServlet.class);
>
> private ServletContext servletContext = getServletContext();
The above doesn't work when I set this servletContext as a class member
variable. Somehow my servlet's init doesn't called when I declare it like
above. I removed the above and just got the servletContext locally inside
my SetupServlet init() and destroy() methods and all is well. Not sure of
exactly why that prevented my init method from getting called on server
start up. I haven't looked into it yet, but if anyone knows why let me know.
thanks.
--
Rick