- Initialize your class in servlet's
init()
method. You may add
attribute to make sure your servlet is created at application startup and not on first access. - Add
ServletContextListener
and usecontextInitialized()
callback method. UseServletContext#setAttribute
to store created object for future use.
沒有留言:
張貼留言
留個話吧:)