List of usage examples for javax.servlet ServletConfig getServletContext
public ServletContext getServletContext();
From source file:org.ringojs.jsgi.ExtJsgiServlet.java
@Override public void init(ServletConfig config) throws ServletException { super.init(config); _servletContext = config.getServletContext(); _springContext = WebApplicationContextUtils.getRequiredWebApplicationContext(_servletContext); // Hacky way of shoving an object into the System properties LOG.info("Injecting spring context into Java system property [{}]", PROP_SPRING_CONTEXT); System.getProperties().put(PROP_SPRING_CONTEXT, _springContext); // Hacky way of shoving the current servlet instance into System properties LOG.info("Injecting this servlet into Java system property [{}]", PROP_SERVLET); System.getProperties().put(PROP_SERVLET, this); }
From source file:com.netcracker.financeapp.controller.MainServlet.java
@Override public void init(ServletConfig config) { try {/*from w w w . ja v a 2s.c o m*/ super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } catch (ServletException ex) { Logger.getLogger(MainServlet.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.netcracker.financeapp.controller.agent.AgentAddServlet.java
@Override public void init(ServletConfig config) { try {/* w w w . ja va 2s . c o m*/ super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } catch (ServletException ex) { Logger.getLogger(AgentAddServlet.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:org.efs.openreports.dispatcher.XMLADispatcher.java
protected CatalogLocator makeCatalogLocator(ServletConfig servletConfig) { ServletContext servletContext = servletConfig.getServletContext(); return new ServletContextCatalogLocator(servletContext); }
From source file:org.wso2.carbon.ui.clients.RegistryAdminServiceClient.java
public RegistryAdminServiceClient(String cookie, ServletConfig config, HttpSession session) throws AxisFault { String serverURL = CarbonUIUtil.getServerURL(config.getServletContext(), session); ConfigurationContext ctx = (ConfigurationContext) config.getServletContext() .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); this.session = session; String serviceEPR = serverURL + "RegistryAdminService"; stub = new RegistryAdminServiceStub(ctx, serviceEPR); ServiceClient client = stub._getServiceClient(); Options options = client.getOptions(); options.setManageSession(true);/*from ww w.ja v a 2 s.c o m*/ if (cookie != null) { options.setProperty(HTTPConstants.COOKIE_STRING, cookie); } }
From source file:com.netcracker.financeapp.controller.agent.AgentDeleteServlet.java
@Override public void init(ServletConfig config) { try {// w ww.j av a2s . c om super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } catch (ServletException ex) { Logger.getLogger(AgentDeleteServlet.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.netcracker.financeapp.controller.bank_card.BankCardDeleteServlet.java
@Override public void init(ServletConfig config) { try {// www .j av a2 s. c om super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } catch (ServletException ex) { Logger.getLogger(BankCardDeleteServlet.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.ibm.util.merge.web.InitializeServlet.java
/** * Initialize Servlet */ @Override public void init(ServletConfig cfg) { initializeApp(cfg.getServletContext()); }
From source file:org.apache.juddi.v3.client.config.UDDIClerkServlet.java
/** * Starting the UDDIClient/*from ww w.jav a 2 s . com*/ */ @Override public void init(ServletConfig config) throws ServletException { super.init(config); try { manager = WebHelper.getUDDIClient(config.getServletContext()); if (manager.getClientConfig().isRegisterOnStartup()) { manager.registerWSDLs(); manager.registerAnnotatedServices(); } } catch (Exception e) { logger.error( "UDDI-client could not be started for manager " + manager.getName() + ". " + e.getMessage(), e); } catch (Throwable t) { logger.error("UDDI-client could not be started." + t.getMessage(), t); } }
From source file:com.netcracker.financeapp.controller.type.TypeDeleteServlet.java
@Override public void init(ServletConfig config) { try {/*from www .j ava 2 s .co m*/ super.init(config); SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext()); } catch (ServletException ex) { Logger.getLogger(TypeDeleteServlet.class.getName()).log(Level.SEVERE, null, ex); } }