Example usage for javax.servlet GenericServlet init

List of usage examples for javax.servlet GenericServlet init

Introduction

In this page you can find the example usage for javax.servlet GenericServlet init.

Prototype

public void init(ServletConfig config) throws ServletException 

Source Link

Document

Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

Usage

From source file:org.jtwig.mvc.JtwigView.java

@Override
protected void initApplicationContext() throws BeansException {
    super.initApplicationContext();
    GenericServlet servlet = getGenericServlet();
    try {//  w  w w .j  ava  2  s. c  o  m
        servlet.init(getServletConfig());
    } catch (ServletException ex) {
        throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex);
    }
}