The load on startup servlet

Let's start with our servlet that will load on the server's start up:

@WebServlet(name = "LoadOnStartupServlet", urlPatterns = {"/LoadOnStartupServlet"}, loadOnStartup = 1)public class LoadOnStartupServlet extends HttpServlet {    @Override    public void init() throws ServletException {        System.out.println("*******SERVLET LOADED                            WITH SERVER's STARTUP*******");    }}

Get Java EE 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.