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