code: public static WebApp get(ServletContext context) {
          Object o = context.getAttribute(WebApp.class.getName());
          if(o==null) {
              synchronized (WebApp.class) {
                  o = context.getAttribute(WebApp.class.getName());
                  if(o==null) {
                      o = new WebApp(context);
                      context.setAttribute(WebApp.class.getName(),o);
                  }
              }
          }
          return (WebApp)o;
      }
docs: Obtains the {@link WebApp} associated with the given {@link ServletContext}.