Java Code Examples for javax.servlet.ServletConfig

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project immutant, under directory /modules/web/src/main/java/org/immutant/web/servlet/.

Source file: RingServlet.java

  21 
vote

@Override public void init() throws ServletException {
  super.init();
  ServletConfig config=getServletConfig();
  this.runtime=(ClojureRuntime)getServletContext().getAttribute(CLOJURE_RUNTIME);
  this.handlerName=config.getServletName();
}
 

Example 2

From project jbpm-form-builder, under directory /jbpm-gwt-form-builder/src/test/java/org/jbpm/formbuilder/server/.

Source file: EmbedingServletTest.java

  20 
vote

public void testInitOK() throws Exception {
  EmbedingServlet servlet=new EmbedingServlet();
  ServletConfig config=EasyMock.createMock(ServletConfig.class);
  EasyMock.replay(config);
  servlet.init(config);
  EasyMock.verify(config);
}
 

Example 3

From project guice-jit-providers, under directory /extensions/servlet/test/com/google/inject/servlet/.

Source file: ServletDefinitionTest.java

  19 
vote

public final void testServletInitAndConfig() throws ServletException {
  Injector injector=createMock(Injector.class);
  Binding binding=createMock(Binding.class);
  expect(binding.acceptScopingVisitor((BindingScopingVisitor)anyObject())).andReturn(true);
  expect(injector.getBinding(Key.get(HttpServlet.class))).andReturn(binding);
  final HttpServlet mockServlet=new HttpServlet(){
  }
;
  expect(injector.getInstance(Key.get(HttpServlet.class))).andReturn(mockServlet).anyTimes();
  replay(injector,binding);
  final Map<String,String> initParams=new ImmutableMap.Builder<String,String>().put("ahsd","asdas24dok").put("ahssd","asdasd124ok").build();
  String pattern="/*";
  final ServletDefinition servletDefinition=new ServletDefinition(pattern,Key.get(HttpServlet.class),UriPatternType.get(UriPatternType.SERVLET,pattern),initParams,null);
  ServletContext servletContext=createMock(ServletContext.class);
  final String contextName="[email protected]@44__SRV" + getClass();
  expect(servletContext.getServletContextName()).andReturn(contextName);
  replay(servletContext);
  servletDefinition.init(servletContext,injector,Sets.newSetFromMap(Maps.<HttpServlet,Boolean>newIdentityHashMap()));
  assertNotNull(mockServlet.getServletContext());
  assertEquals(contextName,mockServlet.getServletContext().getServletContextName());
  assertEquals(Key.get(HttpServlet.class).toString(),mockServlet.getServletName());
  final ServletConfig servletConfig=mockServlet.getServletConfig();
  final Enumeration names=servletConfig.getInitParameterNames();
  while (names.hasMoreElements()) {
    String name=(String)names.nextElement();
    assertTrue(initParams.containsKey(name));
    assertEquals(initParams.get(name),servletConfig.getInitParameter(name));
  }
  verify(injector,binding,servletContext);
}
 

Example 4

From project solder, under directory /testsuite/src/test/java/org/jboss/solder/servlet/test/weld/event/.

Source file: ServletEventBridgeTest.java

  18 
vote

@Test public void should_observe_servlet_context_initialized() throws Exception {
  reset();
  ServletContext ctx=mock(ServletContext.class);
  when(ctx.getServletContextName()).thenReturn("mock");
  ServletConfig cfg=mock(ServletConfig.class);
  when(cfg.getServletContext()).thenReturn(ctx);
  WebApplication webapp=new WebApplication(ctx);
  when(ctx.getAttribute(AbstractServletEventBridge.WEB_APPLICATION_ATTRIBUTE_NAME)).thenReturn(webapp);
  listener.contextInitialized(new ServletContextEvent(ctx));
  servlet.init(cfg);
  observer.assertObservations("@Initialized WebApplication",webapp);
  observer.assertObservations("@Initialized ServletContext",ctx);
  observer.assertObservations("@Started WebApplication",webapp);
}
 

Example 5

From project spring-osgi-web-1.2.1-hotdeployment-patch, under directory /src/test/java/org/springframework/osgi/web/context/support/.

Source file: OsgiBundleXmlWebApplicationContextTest.java

  18 
vote

public void testSetServletConfig(){
  ServletContext servletContext=new MockServletContext();
  BundleContext bc=new MockBundleContext();
  servletContext.setAttribute(OsgiBundleXmlWebApplicationContext.BUNDLE_CONTEXT_ATTRIBUTE,bc);
  ServletConfig servletConfig=new MockServletConfig(servletContext);
  context.setServletConfig(servletConfig);
  assertSame(bc,context.getBundleContext());
}
 

Example 6

From project vysper, under directory /server/extensions/websockets/src/test/java/org/apache/vysper/xmpp/extension/websockets/.

Source file: JettyXmppWebSocketServletTest.java

  18 
vote

@Test public void doWebSocketConnectWithDefaultCstr() throws ServletException {
  ServletContext servletContext=Mockito.mock(ServletContext.class);
  Mockito.when(servletContext.getAttribute(JettyXmppWebSocketServlet.SERVER_RUNTIME_CONTEXT_ATTRIBUTE)).thenReturn(serverRuntimeContext);
  ServletConfig servletConfig=Mockito.mock(ServletConfig.class);
  Mockito.when(servletConfig.getServletContext()).thenReturn(servletContext);
  JettyXmppWebSocketServlet servlet=new JettyXmppWebSocketServlet();
  servlet.init(servletConfig);
  WebSocket webSocket=servlet.doWebSocketConnect(null,"xmpp");
  Assert.assertTrue(webSocket instanceof JettyXmppWebSocket);
}
 

Example 7

From project JsTestDriver, under directory /JsTestDriver/src/com/google/jstestdriver/requesthandlers/.

Source file: ProxyConfiguration.java

  17 
vote

/** 
 * Updates this  {@link ProxyConfiguration} given the new {@code configuration}encoded as a  {@link JsonObject} by discarding previously initialized{@link JstdProxyServlet}s and instantiating new ones with new hosts.
 * @param configuration A {@link JsonObject} specifying a new configuration.
 * @throws ServletException If the new servlets fail to initialize.
 */
public synchronized void updateConfiguration(JsonArray configuration) throws ServletException {
  proxyConfig=configuration;
  ImmutableList.Builder<RequestMatcher> listBuilder=ImmutableList.builder();
  ImmutableMap.Builder<RequestMatcher,JstdProxyServlet> mapBuilder=ImmutableMap.builder();
  for (  JsonElement element : configuration) {
    JsonObject entry=element.getAsJsonObject();
    RequestMatcher matcher=new RequestMatcher(ANY,entry.get(MATCHER).getAsString());
    ServletConfig config=servletConfigFactory.create(matcher.getPrefix(),entry.get(SERVER).getAsString());
    JstdProxyServlet proxy;
    if (proxyServlets.get(matcher) != null) {
      logger.debug("Reusing previous proxy bound to {}.",matcher);
      proxy=proxyServlets.get(matcher);
    }
 else {
      logger.debug("Creating new proxy bound to {}.",matcher);
      proxy=proxyProvider.get();
    }
    proxy.init(config);
    listBuilder.add(matcher);
    mapBuilder.put(matcher,proxy);
  }
  this.matchers=listBuilder.build();
  this.proxyServlets=mapBuilder.build();
}
 

Example 8

From project mgwt, under directory /src/test/java/com/googlecode/mgwt/linker/server/test/.

Source file: TestHtml5ManifestServlet.java

  17 
vote

@Test public void testGetPermutationStrongName() throws ServletException, FileNotFoundException {
  ServletConfig config=new MockServletConfig(){
    @Override public ServletContext getServletContext(){
      return new MockServletContext(){
        @Override public String getRealPath(        String arg0){
          Assert.assertEquals("asdf/" + PermutationMapLinker.MANIFEST_MAP_FILE_NAME,arg0);
          URL url=TestHtml5ManifestServlet.class.getResource("/com/googlecode/mgwt/linker/server/test/resources/example.manifestmap.xml");
          try {
            return url.toURI().toString().substring("file:".length());
          }
 catch (          URISyntaxException e) {
            Assert.fail("should not happen");
            return "asdf";
          }
        }
      }
;
    }
  }
;
  servlet.init(config);
  HashSet<BindingProperty> set=new HashSet<BindingProperty>();
  set.add(new BindingProperty("mgwt.os","blackberry"));
  set.add(new BindingProperty("mobile.user.agent","not_mobile"));
  set.add(new BindingProperty("user.agent","safari"));
  String permutationStrongName=servlet.getPermutationStrongName("","asdf",set);
  Assert.assertEquals("C83A451EFE8ADF0BDB46AEAAC44B0063",permutationStrongName);
}
 

Example 9

From project OTAService, under directory /modules/ota-webapp/src/test/java/com/sap/prd/mobile/ios/ota/webapp/.

Source file: OtaHtmlServiceTest.java

  17 
vote

private OtaHtmlService mockServletContextInitParameters(OtaHtmlService service,String... keyValuePairs){
  if (keyValuePairs.length % 2 != 0) {
    throw new IllegalArgumentException("keyValuePairs has uneven length: " + keyValuePairs.length);
  }
  OtaHtmlService serviceSpy=Mockito.spy(service);
  ServletConfig configMock=mock(ServletConfig.class);
  when(serviceSpy.getServletConfig()).thenReturn(configMock);
  List<String> keys=new ArrayList<String>();
  ServletContext contextMock=mock(ServletContext.class);
  for (int i=0; i < keyValuePairs.length; i+=2) {
    String key=keyValuePairs[i];
    keys.add(key);
    String value=keyValuePairs[i + 1];
    when(contextMock.getInitParameter(key)).thenReturn(value);
  }
  when(contextMock.getInitParameterNames()).thenReturn(Collections.enumeration(keys));
  when(serviceSpy.getServletContext()).thenReturn(contextMock);
  return serviceSpy;
}
 

Example 10

From project pluto, under directory /pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/.

Source file: PortletServlet.java

  17 
vote

protected boolean attemptRegistration(ServletContext context,ClassLoader paClassLoader){
  if (PlutoServices.getServices() != null) {
    contextService=PlutoServices.getServices().getPortletContextService();
    try {
      ServletConfig sConfig=getServletConfig();
      if (sConfig == null) {
        String msg="Problem obtaining servlet configuration(getServletConfig() returns null).";
        context.log(msg);
        return true;
      }
      String applicationName=contextService.register(sConfig);
      started=true;
      portletContext=contextService.getPortletContext(applicationName);
      portletConfig=contextService.getPortletConfig(applicationName,portletName);
    }
 catch (    PortletContainerException ex) {
      context.log(ex.getMessage(),ex);
      return true;
    }
    PortletDefinition portletDD=portletConfig.getPortletDefinition();
    try {
      Class<?> clazz=paClassLoader.loadClass((portletDD.getPortletClass()));
      portlet=(Portlet)clazz.newInstance();
      portlet.init(portletConfig);
      initializeEventPortlet();
      initializeResourceServingPortlet();
      return true;
    }
 catch (    Exception ex) {
      context.log(ex.getMessage(),ex);
      portlet=null;
      portletConfig=null;
      return true;
    }
  }
  return false;
}
 

Example 11

From project sisu-guice, under directory /extensions/servlet/test/com/google/inject/servlet/.

Source file: ServletDefinitionTest.java

  17 
vote

public final void testServletInitAndConfig() throws ServletException {
  Injector injector=createMock(Injector.class);
  Binding binding=createMock(Binding.class);
  expect(binding.acceptScopingVisitor((BindingScopingVisitor)anyObject())).andReturn(true);
  expect(injector.getBinding(Key.get(HttpServlet.class))).andReturn(binding);
  final HttpServlet mockServlet=new HttpServlet(){
  }
;
  expect(injector.getInstance(Key.get(HttpServlet.class))).andReturn(mockServlet).anyTimes();
  replay(injector,binding);
  final Map<String,String> initParams=new ImmutableMap.Builder<String,String>().put("ahsd","asdas24dok").put("ahssd","asdasd124ok").build();
  String pattern="/*";
  final ServletDefinition servletDefinition=new ServletDefinition(pattern,Key.get(HttpServlet.class),UriPatternType.get(UriPatternType.SERVLET,pattern),initParams,null);
  ServletContext servletContext=createMock(ServletContext.class);
  final String contextName="[email protected]@44__SRV" + getClass();
  expect(servletContext.getServletContextName()).andReturn(contextName);
  replay(servletContext);
  servletDefinition.init(servletContext,injector,Sets.newSetFromMap(Maps.<HttpServlet,Boolean>newIdentityHashMap()));
  assertNotNull(mockServlet.getServletContext());
  assertEquals(contextName,mockServlet.getServletContext().getServletContextName());
  assertEquals(Key.get(HttpServlet.class).toString(),mockServlet.getServletName());
  final ServletConfig servletConfig=mockServlet.getServletConfig();
  final Enumeration names=servletConfig.getInitParameterNames();
  while (names.hasMoreElements()) {
    String name=(String)names.nextElement();
    assertTrue(initParams.containsKey(name));
    assertEquals(initParams.get(name),servletConfig.getInitParameter(name));
  }
  verify(injector,binding,servletContext);
}
 

Example 12

From project springfaces-v1, under directory /org.springframework.faces.mvc/src/test/java/org/springframework/faces/mvc/servlet/.

Source file: FacesHandlerAdapterTests.java

  17 
vote

public void testDelegatingServletConfig() throws Exception {
  Properties initParameters=new Properties();
  initParameters.setProperty("testkey","testvalue");
  ServletContext servletContext=(ServletContext)EasyMock.createMock(ServletContext.class);
  adapter.setInitParameters(initParameters);
  adapter.setServletContext(servletContext);
  adapter.setOverrideInitParameters(false);
  adapter.setFacesServletClass(MockServlet.class);
  adapter.afterPropertiesSet();
  MockServlet servlet=(MockServlet)adapter.getFacesServlet();
  ServletConfig config=servlet.getServletConfig();
  assertTrue(EnumerationUtils.toList(config.getInitParameterNames()).contains("testkey"));
  assertEquals("testvalue",config.getInitParameter("testkey"));
  assertEquals("testAdapterBean",config.getServletName());
  assertSame(servletContext,config.getServletContext());
}
 

Example 13

From project structr, under directory /structr/structr-core/src/main/java/org/structr/core/auth/.

Source file: AuthenticatorCommand.java

  17 
vote

@Override public Object execute(Object... parameters) throws FrameworkException {
  if (parameters != null && parameters.length == 1 && parameters[0] instanceof ServletConfig) {
    ServletConfig servletConfig=(ServletConfig)parameters[0];
    Authenticator authenticator=null;
    if (servletConfig != null) {
      String authenticatorClassName=servletConfig.getInitParameter(AuthenticationService.SERVLET_PARAMETER_AUTHENTICATOR);
      if (authenticatorClassName != null) {
        try {
          Class authenticatorClass=Class.forName(authenticatorClassName);
          authenticator=(Authenticator)authenticatorClass.newInstance();
          servletConfig.getServletContext().setAttribute(AuthenticationService.SERVLET_PARAMETER_AUTHENTICATOR,authenticator);
        }
 catch (        Throwable t) {
          logger.log(Level.SEVERE,"Error instantiating authenticator for servlet with context path {0}: {1}",new Object[]{servletConfig.getServletName(),t});
        }
      }
 else {
        logger.log(Level.SEVERE,"No authenticator for servlet with context path {0}",servletConfig.getServletName());
      }
      return authenticator;
    }
  }
  return null;
}
 

Example 14

From project tiles, under directory /tiles-servlet/src/test/java/org/apache/tiles/web/startup/.

Source file: AbstractTilesInitializerServletTest.java

  17 
vote

/** 
 * Test method for  {@link org.apache.tiles.web.startup.AbstractTilesInitializerServlet#init()}.
 * @throws ServletException If something goes wrong.
 */
@SuppressWarnings("unchecked") @Test public void testInit() throws ServletException {
  AbstractTilesInitializerServlet servlet=createMockBuilder(AbstractTilesInitializerServlet.class).createMock();
  TilesInitializer initializer=createMock(TilesInitializer.class);
  ServletConfig config=createMock(ServletConfig.class);
  ServletContext servletContext=createMock(ServletContext.class);
  Enumeration<String> names=createMock(Enumeration.class);
  expect(servlet.createTilesInitializer()).andReturn(initializer);
  expect(config.getServletContext()).andReturn(servletContext);
  expect(servletContext.getInitParameterNames()).andReturn(names);
  expect(config.getInitParameterNames()).andReturn(names);
  expect(names.hasMoreElements()).andReturn(false).times(2);
  initializer.initialize(isA(ServletApplicationContext.class));
  initializer.destroy();
  replay(servlet,initializer,config,servletContext,names);
  servlet.init(config);
  servlet.destroy();
  verify(servlet,initializer,config,servletContext,names);
}
 

Example 15

From project tiles-request, under directory /tiles-request-freemarker/src/test/java/org/apache/tiles/request/freemarker/render/.

Source file: FreemarkerRendererTest.java

  17 
vote

/** 
 * Tests  {@link FreemarkerRenderer#render(String,org.apache.tiles.request.Request)}.
 * @throws IOException If something goes wrong.
 * @throws ServletException If something goes wrong.
 */
@Test(expected=CannotRenderException.class) public void testRenderException1() throws IOException, ServletException {
  ApplicationContext applicationContext=createMock(ServletApplicationContext.class);
  ServletContext servletContext=createMock(ServletContext.class);
  GenericServlet servlet=createMockBuilder(GenericServlet.class).createMock();
  ServletConfig servletConfig=createMock(ServletConfig.class);
  ObjectWrapper objectWrapper=createMock(ObjectWrapper.class);
  replay(servlet,servletConfig);
  servlet.init(servletConfig);
  expect(applicationContext.getContext()).andReturn(servletContext).anyTimes();
  expect(servletContext.getRealPath(isA(String.class))).andReturn(null).anyTimes();
  URL resource=getClass().getResource("/test.ftl");
  expect(servletContext.getResource(isA(String.class))).andReturn(resource).anyTimes();
  replay(applicationContext,servletContext,objectWrapper);
  FreemarkerRenderer renderer=FreemarkerRendererBuilder.createInstance().setApplicationContext(applicationContext).setParameter("TemplatePath","/").setParameter("NoCache","true").setParameter("ContentType","text/html").setParameter("template_update_delay","0").setParameter("default_encoding","ISO-8859-1").setParameter("number_format","0.##########").build();
  ServletRequest request=createMock(ServletRequest.class);
  replay(request);
  try {
    renderer.render(null,request);
  }
  finally {
    verify(applicationContext,servletContext,request,servlet,servletConfig,objectWrapper);
  }
}
 

Example 16

From project virgo.snaps, under directory /org.eclipse.virgo.snaps.core/src/main/java/org/eclipse/virgo/snaps/core/internal/webapp/container/.

Source file: ServletManager.java

  17 
vote

void init() throws ServletException {
  try {
    ManagerUtils.doWithThreadContextClassLoader(this.classLoader,new ClassLoaderCallback<Void>(){
      public Void doWithClassLoader() throws ServletException {
        for (        Map.Entry<String,ServletHolder> entry : servlets.entrySet()) {
          ServletHolder holder=entry.getValue();
          ServletConfig config=new ImmutableServletConfig(holder.getDefinition(),snapServletContext);
          holder.getInstance().init(config);
        }
        return null;
      }
    }
);
  }
 catch (  IOException e) {
    logger.error("Unexpected IOException from servlet init",e);
    throw new ServletException("Unexpected IOException from servlet init",e);
  }
}
 

Example 17

From project jsf-test, under directory /stage/src/main/java/org/jboss/test/faces/staging/.

Source file: ServletContainer.java

  16 
vote

public void init(final ServletContext context) throws ServletException {
  if (!initialized) {
    log.finest("Initialize servlet " + getName());
    servlet.init(new ServletConfig(){
      public String getInitParameter(      String name){
        return initParameters.get(name);
      }
      @SuppressWarnings("unchecked") public Enumeration getInitParameterNames(){
        return Collections.enumeration(initParameters.keySet());
      }
      public ServletContext getServletContext(){
        return context;
      }
      public String getServletName(){
        return name;
      }
    }
);
    initialized=true;
  }
}
 

Example 18

From project passfault, under directory /jsonService/src/com/passfault/web/.

Source file: PassfaultServlet.java

  16 
vote

/** 
 * @see Servlet#init(ServletConfig)
 */
public void init(ServletConfig config) throws ServletException {
  try {
    finders=BuildFinders.build(config.getServletContext());
    defaultAttackProfile=config.getInitParameter(ATTACK_PROFILE);
    defaultProtectionType=config.getInitParameter(PROTECTION_TYPE);
  }
 catch (  IOException e) {
    throw new ServletException("Could not configure password finders",e);
  }
}
 

Example 19

From project Pitbull, under directory /pitbull-servlet/src/main/java/org/jboss/pitbull/servlet/.

Source file: DeploymentServletRegistration.java

  16 
vote

public void initialize(InstanceManager im,ClassLoader loader) throws Exception {
  this.im=im;
  this.config=new ServletConfig(){
    @Override public String getServletName(){
      return DeploymentServletRegistration.this.name;
    }
    @Override public ServletContext getServletContext(){
      return DeploymentServletRegistration.this.servletContext;
    }
    @Override public String getInitParameter(    String name){
      return DeploymentServletRegistration.this.getInitParameter(name);
    }
    @Override public Enumeration<String> getInitParameterNames(){
      final Iterator<String> it=DeploymentServletRegistration.this.initParameters.keySet().iterator();
      return new Enumeration<String>(){
        @Override public boolean hasMoreElements(){
          return it.hasNext();
        }
        @Override public String nextElement(){
          return it.next();
        }
      }
;
    }
  }
;
  if (servlet == null && servletClass == null) {
    servletClass=(Class<? extends Servlet>)loader.loadClass(className);
  }
  if (servlet != null) {
    servletClass=servlet.getClass();
  }
  if (SingleThreadModel.class.isAssignableFrom(servletClass)) {
    perRequest=true;
  }
  if (loadLevel >= 0 && !perRequest) {
    initializeServlet();
  }
}
 

Example 20

From project Possom, under directory /skinresourcefeed/src/main/java/no/sesat/commons/resourcefeed/.

Source file: ResourceServlet.java

  16 
vote

/** 
 * {@inheritDoc}
 */
@Override @SuppressWarnings("unchecked") public void init(final ServletConfig config){
  this.servletConfig=config;
  defaultLastModified=System.currentTimeMillis();
  LOG.warn(DEBUG_DEFAULT_MODIFCATION_TIMESTAMP + defaultLastModified);
  final String allowed=config.getInitParameter("ipaddresses.allowed");
  LOG.warn("allowing ipaddresses " + allowed);
  if (null != allowed && allowed.length() > 0) {
    ipaddressesAllowed=allowed.split(",");
  }
  final String restricted=config.getInitParameter("resources.restricted");
  LOG.warn("restricted resources " + restricted);
  if (null != restricted && restricted.length() > 0) {
    RESTRICTED.addAll(Arrays.asList(restricted.split(",")));
  }
  final String paths=config.getInitParameter("content.paths");
  LOG.warn("content path mappings " + paths);
  if (null != paths && paths.length() > 0) {
    final String[] pathArr=paths.split(",");
    for (    String path : pathArr) {
      final String[] pair=path.split("=");
      CONTENT_PATHS.put(pair[0],pair[1]);
    }
  }
  this.paths=servletConfig.getServletContext().getResourcePaths("/WEB-INF/lib");
  LOG.warn("ResourcePaths are");
  for (  String s : this.paths) {
    LOG.warn(' ' + s);
  }
}
 

Example 21

From project resty-gwt, under directory /restygwt/src/it/restygwt-cxf-jaxson-example/src/main/java/org/fusesource/restygwt/examples/server/.

Source file: CxfServlet.java

  16 
vote

public void init(final ServletConfig servletConfig) throws ServletException {
  super.init(new ServletConfig(){
    public String getServletName(){
      return servletConfig.getServletName();
    }
    public ServletContext getServletContext(){
      return servletConfig.getServletContext();
    }
    @SuppressWarnings("unchecked") public Enumeration getInitParameterNames(){
      return initParams.keys();
    }
    public String getInitParameter(    String name){
      return initParams.getProperty(name);
    }
  }
);
}
 

Example 22

From project teamcity-nuget-support, under directory /nuget-server/src/jetbrains/buildServer/nuget/server/feed/server/javaFeed/.

Source file: ODataPackagesFeedController.java

  16 
vote

private ServletConfig createServletConfig(@NotNull final ServletConfig config){
  final Map<String,String> myInit=new HashMap<String,String>();
  final Enumeration<String> it=config.getInitParameterNames();
  while (it.hasMoreElements()) {
    final String key=it.nextElement();
    myInit.put(key,config.getInitParameter(key));
  }
  myInit.put("com.sun.jersey.config.property.packages","jetbrains.buildServer.nuget");
  return new ServletConfig(){
    public String getServletName(){
      return config.getServletName();
    }
    public ServletContext getServletContext(){
      return config.getServletContext();
    }
    public String getInitParameter(    String s){
      return myInit.get(s);
    }
    public Enumeration<String> getInitParameterNames(){
      return new Vector<String>(myInit.keySet()).elements();
    }
  }
;
}
 

Example 23

From project AceWiki, under directory /src/ch/uzh/ifi/attempto/acewiki/.

Source file: AceWikiServlet.java

  15 
vote

/** 
 * Init the AceWiki servlet, get its Backend from ServletContext according to its config in web.xml or create backend if no 'backend' parameter exist.
 * @param config servlet config.
 */
public void init(ServletConfig config) throws ServletException {
  parameters=getInitParameters(config);
  if (logger == null) {
    logger=new Logger(parameters.get("context:logdir") + "/syst","syst",0);
  }
  backendName=config.getInitParameter("backend");
  if (backendName != null) {
    logger.log("appl","use backend: " + backendName);
    while (true) {
      backend=(Backend)config.getServletContext().getAttribute(backendName);
      if (backend != null)       break;
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException e) {
        break;
      }
    }
    Map<String,String> p=parameters;
    parameters=new HashMap<String,String>();
    parameters.putAll(backend.getParameters());
    parameters.putAll(p);
  }
 else {
    logger.log("appl","create backend");
    APE.setParameters(parameters);
    backend=new Backend(parameters);
  }
  super.init(config);
}
 

Example 24

From project ANNIS, under directory /annis-gui/src/main/java/annis/gui/servlets/.

Source file: BinaryServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  ClientConfig cc=new DefaultClientConfig(SaltProjectProvider.class);
  cc.getProperties().put(ClientConfig.PROPERTY_THREADPOOL_SIZE,10);
  cc.getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT,500);
  client=Client.create(cc);
}
 

Example 25

From project apjp, under directory /APJP_REMOTE_JAVA/src/main/java/APJP/HTTP/.

Source file: HTTPServlet.java

  15 
vote

public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);
  logger=Logger.getLogger(HTTPServlet.class.getName());
  Properties properties=new Properties();
  try {
    properties.load(getServletContext().getResourceAsStream("/WEB-INF/APJP_REMOTE.properties"));
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
  APJP_KEY=properties.getProperty("APJP_KEY","");
  APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_KEY=new String[5];
  APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_VALUE=new String[5];
  for (int i=0; i < APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_KEY.length; i=i + 1) {
    APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_KEY[i]=properties.getProperty("APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_" + (i + 1) + "_KEY","");
    APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_VALUE[i]=properties.getProperty("APJP_REMOTE_HTTP_SERVER_RESPONSE_PROPERTY_" + (i + 1) + "_VALUE","");
  }
}
 

Example 26

From project azkaban, under directory /azkaban/src/java/azkaban/web/pages/.

Source file: HdfsBrowserServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    Configuration conf=new Configuration();
    conf.setClassLoader(this.getApplication().getClassLoader());
    _fs=FileSystem.get(conf);
  }
 catch (  IOException e) {
    throw new ServletException(e);
  }
}
 

Example 27

From project brix-cms, under directory /brix-rmiserver/src/main/java/org/brixcms/rmiserver/web/dav/.

Source file: WebDavServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  final ServletContext sc=config.getServletContext();
  ApplicationContext context=WebApplicationContextUtils.getWebApplicationContext(sc);
  if (context == null) {
    throw new IllegalStateException("Could not find application context");
  }
  repository=(Repository)BeanFactoryUtils.beanOfTypeIncludingAncestors(context,Repository.class);
  if (repository == null) {
    throw new IllegalStateException("Could not find JackRabbit repository in spring context");
  }
  UserService users=(UserService)BeanFactoryUtils.beanOfTypeIncludingAncestors(context,UserService.class);
  if (repository == null) {
    throw new IllegalStateException("Could not find UserService implementation in spring context");
  }
  authorizer=new Authorizer(users);
  credentialsProvider=getCredentialsProvider();
}
 

Example 28

From project Carolina-Digital-Repository, under directory /djatoka-cdr/src/gov/lanl/adore/djatoka/openurl/.

Source file: OpenURLServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    openURLConfig=new org.oclc.oomRef.config.OpenURLConfig(config);
    transports=openURLConfig.getTransports();
    processor=openURLConfig.getProcessor();
    ClassLoader cl=OpenURLServlet.class.getClassLoader();
    java.net.URL url=cl.getResource("access.txt");
    if (url != null)     am=new AccessManager(url.getFile());
    url=cl.getResource("authentication.properties");
    logger.debug("Authentication properties path: " + url.toString());
    if (url != null) {
      authManager=new AuthenticationManager(IOUtils.loadProperty(new FileInputStream(url.getFile())));
      IOUtils.authManager=authManager;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new ServletException(e.getMessage(),e);
  }
}
 

Example 29

From project cas, under directory /cas-server-core/src/main/java/org/jasig/cas/web/init/.

Source file: SafeDispatcherServlet.java

  15 
vote

public void init(final ServletConfig config){
  try {
    this.delegate.init(config);
  }
 catch (  final Throwable t) {
    this.initSuccess=false;
    final String message="SafeDispatcherServlet: \n" + "The Spring DispatcherServlet we wrap threw on init.\n" + "But for our having caught this error, the servlet would not have initialized.";
    log.error(message,t);
    System.err.println(message);
    t.printStackTrace();
    ServletContext context=config.getServletContext();
    context.log(message,t);
    context.setAttribute(CAUGHT_THROWABLE_KEY,t);
  }
}
 

Example 30

From project chukwa, under directory /src/main/java/org/apache/hadoop/chukwa/datacollection/collector/servlet/.

Source file: CommitCheckServlet.java

  15 
vote

public void init(ServletConfig servletConf) throws ServletException {
  log.info("initing commit check servlet");
  try {
    FileSystem fs=FileSystem.get(new URI(conf.get("writer.hdfs.filesystem","file:///")),conf);
    log.info("commitcheck fs is " + fs.getUri());
    commitCheck=new CommitCheckThread(conf,fs);
    commitCheck.start();
  }
 catch (  Exception e) {
    log.error("couldn't start CommitCheckServlet",e);
    throw new ServletException(e);
  }
}
 

Example 31

From project cipango, under directory /cipango-console/src/main/java/org/cipango/console/.

Source file: VelocityConsoleServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  _localConnection=new JmxConnection.LocalConnection();
  if (_localConnection.isConnectionValid()) {
    try {
      StatisticGraph statisticGraph=new StatisticGraph(_localConnection);
      statisticGraph.start();
      _statisticGraphs.put(_localConnection.getId(),statisticGraph);
    }
 catch (    Exception e) {
      _logger.warn("Failed to start statistic graph",e);
    }
  }
  _jmxMap.put(_localConnection.getId(),_localConnection);
  List<JmxConnection.RmiConnection> rmiConnections=JmxConnection.RmiConnection.getRmiConnections();
  for (  JmxConnection.RmiConnection connection : rmiConnections) {
    try {
      _jmxMap.put(connection.getId(),connection);
      StatisticGraph statisticGraph=new StatisticGraph(connection);
      statisticGraph.start();
      _statisticGraphs.put(connection.getId(),statisticGraph);
    }
 catch (    Exception e) {
      _logger.warn("Unable to add RMI connection: " + connection,e);
    }
  }
  if (getServletContext().getAttribute(MenuFactory.class.getName()) == null)   getServletContext().setAttribute(MenuFactory.class.getName(),new MenuFactoryImpl());
}
 

Example 32

From project CMM-data-grabber, under directory /benny/src/main/java/au/edu/uq/cmm/benny/.

Source file: Benny.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  Properties props=new Properties();
  InputStream is=getClass().getResourceAsStream(PROPS_RESOURCE);
  if (is == null) {
    throw new ServletException("Cannot find resource: " + PROPS_RESOURCE);
  }
  try {
    props.load(is);
  }
 catch (  IOException ex) {
    throw new ServletException("Cannot load the configuration properties in resource " + PROPS_RESOURCE);
  }
  try {
    realm=props.getProperty("benny.realm");
    authenticator=new AclsAuthenticator(props.getProperty("benny.serverHost"),Integer.parseInt(props.getProperty("benny.serverPort")),Integer.parseInt(props.getProperty("benny.serverTimeout")),props.getProperty("benny.dummyFacility"),props.getProperty("benny.localHostId"));
  }
 catch (  Exception ex) {
    throw new ServletException("Cannot instantiate the authenticator");
  }
}
 

Example 33

From project codjo-webservices, under directory /codjo-webservices-common/src/main/java/com/tilab/wsig/servlet/.

Source file: WSIGServlet.java

  15 
vote

/** 
 * Init wsig servlet
 */
public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);
  log.info("Starting WSIG Servlet...");
  servletContext=servletConfig.getServletContext();
  String wsigPropertyPath=servletContext.getRealPath(WSIGConfiguration.WSIG_DEFAULT_CONFIGURATION_FILE);
  log.info("Configuration file= " + wsigPropertyPath);
  WSIGConfiguration.init(wsigPropertyPath);
  servletContext.setAttribute("WSIGConfiguration",WSIGConfiguration.getInstance());
  WSIGConfiguration config=WSIGConfiguration.getInstance();
  consoleUri=config.getWsigConsoleUri();
  String gatewayClassName=config.getAgentClassName();
  String wsdlDirectory=config.getWsdlDirectory();
  String wsdlPath=servletContext.getRealPath(wsdlDirectory);
  executionTimeout=config.getWsigTimeout();
  wsigStore=new WSIGStore();
  servletContext.setAttribute("WSIGStore",wsigStore);
  Properties jadeProfile=new Properties();
  copyPropertyIfExists(config,jadeProfile,"host");
  copyPropertyIfExists(config,jadeProfile,"port");
  copyPropertyIfExists(config,jadeProfile,"local-port");
  copyPropertyIfExists(config,jadeProfile,"container-name");
  log.info("Init Jade Gateway...");
  Object[] wsigArguments=new Object[]{wsigPropertyPath,wsdlPath,wsigStore};
  jadeProfile.setProperty(jade.core.Profile.MAIN,"false");
  JadeGateway.init(gatewayClassName,wsigArguments,jadeProfile);
  log.info("Jade Gateway initialized");
  startupWSIGAgent();
  log.info("WSIG Servlet started");
}
 

Example 34

From project cometd, under directory /cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/.

Source file: OortConfigServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  _config=config;
  BayeuxServer bayeux=(BayeuxServer)config.getServletContext().getAttribute(BayeuxServer.ATTRIBUTE);
  if (bayeux == null)   throw new UnavailableException("Missing " + BayeuxServer.ATTRIBUTE + " attribute");
  String url=provideOortURL();
  if (url == null)   throw new UnavailableException("Missing " + OORT_URL_PARAM + " init parameter");
  try {
    Oort oort=newOort(bayeux,url);
    boolean clientDebug=Boolean.parseBoolean(_config.getInitParameter(OORT_CLIENT_DEBUG_PARAM));
    oort.setClientDebugEnabled(clientDebug);
    String secret=_config.getInitParameter(OORT_SECRET_PARAM);
    if (secret != null)     oort.setSecret(secret);
    boolean enableAckExtension=Boolean.parseBoolean(_config.getInitParameter(OORT_ENABLE_ACK_EXTENSION_PARAM));
    oort.setAckExtensionEnabled(enableAckExtension);
    oort.start();
    _config.getServletContext().setAttribute(Oort.OORT_ATTRIBUTE,oort);
    configureCloud(config,oort);
    String channels=_config.getInitParameter(OORT_CHANNELS_PARAM);
    if (channels != null) {
      String[] patterns=channels.split(",");
      for (      String channel : patterns) {
        channel=channel.trim();
        if (channel.length() > 0)         oort.observeChannel(channel);
      }
    }
  }
 catch (  Exception x) {
    throw new ServletException(x);
  }
}
 

Example 35

From project core_4, under directory /impl/src/main/java/org/richfaces/webapp/.

Source file: PushServlet.java

  15 
vote

@Override public void init(final ServletConfig sc) throws ServletException {
  if (!initialized) {
    super.init(new ServletConfigDefaultsWrapper(sc,DEFAULT_INIT_PARAMETERS));
    this.initialized=true;
    String mapping=(String)sc.getServletContext().getAttribute(PushContextFactoryImpl.PUSH_HANDLER_MAPPING_ATTRIBUTE);
    if (mapping == null) {
      mapping="*";
    }
    ReflectorServletProcessor r=new ReflectorServletProcessor(this);
    r.setFilterClassName(PushHandlerFilter.class.getName());
    framework.addAtmosphereHandler(mapping,r).initAtmosphereHandler(sc);
  }
}
 

Example 36

From project dcm4che, under directory /dcm4che-servlet/src/main/java/org/dcm4che/sample/servlet/.

Source file: EchoSCPServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    dicomConfig=(DicomConfiguration)Class.forName(config.getInitParameter("dicomConfigurationClass"),false,Thread.currentThread().getContextClassLoader()).newInstance();
    echoSCP=new EchoSCP(dicomConfig,config.getInitParameter("deviceName"));
    echoSCP.start();
    mbean=ManagementFactory.getPlatformMBeanServer().registerMBean(echoSCP,new ObjectName(config.getInitParameter("jmxName")));
  }
 catch (  Exception e) {
    destroy();
    throw new ServletException(e);
  }
}
 

Example 37

From project DirectMemory, under directory /server/directmemory-server/src/main/java/org/apache/directmemory/server/services/.

Source file: DirectMemoryServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  cacheService=new DirectMemory<Object,Object>().setNumberOfBuffers(getInteger("directMemory.numberOfBuffers",10)).setSize(getInteger("directMemory.size",1000)).setInitialCapacity(getInteger("directMemory.initialCapacity",DEFAULT_INITIAL_CAPACITY)).setConcurrencyLevel(getInteger("directMemory.concurrencyLevel",DEFAULT_CONCURRENCY_LEVEL)).newCacheService();
  contentTypeHandlers=new HashMap<String,ContentTypeHandler>(2);
  contentTypeHandlers.put(MediaType.APPLICATION_JSON,new JsonContentTypeHandler());
  contentTypeHandlers.put(DirectMemoryHttpConstants.JAVA_SERIALIZED_OBJECT_CONTENT_TYPE_HEADER,new JavaSerializedContentTypeHandler());
  contentTypeHandlers.put(MediaType.TEXT_PLAIN,new TextPlainContentTypeHandler());
  log.info("DirectMemoryServlet initialized");
}
 

Example 38

From project flip, under directory /servlet/src/main/java/com/tacitknowledge/flip/servlet/.

Source file: SimpleFlipBootstrapServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  this.config=config;
  String packagePath=config.getInitParameter(PACKAGE_PATH);
  FeatureServiceReflectionFactory factory=new FeatureServiceReflectionFactory();
  FeatureService service=factory.createFeatureService(getPackagesToSearch(packagePath));
  FlipContext.setFeatureService(service);
}
 

Example 39

From project gengweibo, under directory /src/com/gengweibo/web/.

Source file: GuiceInit.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  Injector injector=Guice.createInjector(new Module(){
    public void configure(    Binder binder){
      binder.bind(AccountAcction.class).in(Singleton.class);
      binder.bind(WeiboDao.class).to(WeiboDaoJdbcImpl.class).in(Singleton.class);
      binder.bind(DataSource.class).toProvider(C3P0Provider.class).in(Singleton.class);
      Properties properties=new Properties();
      try {
        properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("database.properties"));
      }
 catch (      IOException e) {
        throw new ExceptionInInitializerError(e);
      }
      Names.bindProperties(binder,properties);
    }
  }
);
  config.getServletContext().setAttribute(Injector.class.getName(),injector);
}
 

Example 40

From project gitblit, under directory /src/com/gitblit/.

Source file: GitServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  groovyDir=GitBlit.getGroovyScriptsFolder();
  try {
    File grapeRoot=new File(GitBlit.getString(Keys.groovy.grapeFolder,"groovy/grape")).getAbsoluteFile();
    grapeRoot.mkdirs();
    System.setProperty("grape.root",grapeRoot.getAbsolutePath());
    gse=new GroovyScriptEngine(groovyDir.getAbsolutePath());
  }
 catch (  IOException e) {
    throw new ServletException("Failed to instantiate Groovy Script Engine!",e);
  }
  setReceivePackFactory(new DefaultReceivePackFactory(){
    @Override public ReceivePack create(    HttpServletRequest req,    Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException {
      String repositoryName=req.getPathInfo().substring(1);
      repositoryName=GitFilter.getRepositoryName(repositoryName);
      GitblitReceiveHook hook=new GitblitReceiveHook();
      hook.repositoryName=repositoryName;
      hook.gitblitUrl=HttpUtils.getGitblitURL(req);
      ReceivePack rp=super.create(req,db);
      rp.setPreReceiveHook(hook);
      rp.setPostReceiveHook(hook);
      PersonIdent person=rp.getRefLogIdent();
      UserModel user=GitBlit.self().getUserModel(person.getName());
      if (user == null) {
        user=new UserModel(person.getName());
      }
      RepositoryModel repository=GitBlit.self().getRepositoryModel(repositoryName);
      rp.setAllowCreates(user.canCreateRef(repository));
      rp.setAllowDeletes(user.canDeleteRef(repository));
      rp.setAllowNonFastForwards(user.canRewindRef(repository));
      return rp;
    }
  }
);
  super.init(new GitblitServletConfig(config));
}
 

Example 41

From project guj.com.br, under directory /src/net/jforum/.

Source file: JForum.java

  15 
vote

/** 
 * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
 */
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  super.startApplication();
  isDatabaseUp=ForumStartup.startDatabase();
  try {
    Connection conn=DBConnection.getImplementation().getConnection();
    conn.setAutoCommit(!SystemGlobals.getBoolValue(ConfigKeys.DATABASE_USE_TRANSACTIONS));
    MySQLVersionWorkarounder dw=new MySQLVersionWorkarounder();
    dw.handleWorkarounds(conn);
    JForumExecutionContext ex=JForumExecutionContext.get();
    ex.setConnection(conn);
    JForumExecutionContext.set(ex);
    ForumStartup.startForumRepository();
    RankingRepository.loadRanks();
    SmiliesRepository.loadSmilies();
    BanlistRepository.loadBanlist();
  }
 catch (  Throwable e) {
    e.printStackTrace();
    throw new ForumStartupException("Error while starting jforum",e);
  }
 finally {
    JForumExecutionContext.finish();
  }
}
 

Example 42

From project HiTune_1, under directory /chukwa-hitune-dist/src/java/org/apache/hadoop/chukwa/datacollection/collector/servlet/.

Source file: CommitCheckServlet.java

  15 
vote

public void init(ServletConfig servletConf) throws ServletException {
  log.info("initing commit check servlet");
  try {
    FileSystem fs=FileSystem.get(new URI(conf.get("writer.hdfs.filesystem","file:///")),conf);
    log.info("commitcheck fs is " + fs.getUri());
    commitCheck=new CommitCheckThread(conf,fs);
    commitCheck.start();
  }
 catch (  Exception e) {
    log.error("couldn't start CommitCheckServlet",e);
    throw new ServletException(e);
  }
}
 

Example 43

From project Hphoto, under directory /src/java/com/hphoto/server/.

Source file: ApiServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  if (server != null) {
    return;
  }
  try {
    ServletContext context=config.getServletContext();
    this.server=(TableServer)context.getAttribute("hphoto.tableServer");
    this.conf=(Configuration)context.getAttribute("hphoto.conf");
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
}
 

Example 44

From project huiswerk, under directory /print/zxing-1.6/zxingorg/src/com/google/zxing/web/.

Source file: DecodeServlet.java

  15 
vote

@Override public void init(ServletConfig servletConfig){
  Logger logger=Logger.getLogger("com.google.zxing");
  logger.addHandler(new ServletContextLogHandler(servletConfig.getServletContext()));
  params=new BasicHttpParams();
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  registry=new SchemeRegistry();
  registry.register(new Scheme("http",PlainSocketFactory.getSocketFactory(),80));
  registry.register(new Scheme("https",SSLSocketFactory.getSocketFactory(),443));
  diskFileItemFactory=new DiskFileItemFactory();
  log.info("DecodeServlet configured");
}
 

Example 45

From project iJetty, under directory /console/webapp/src/main/java/org/mortbay/ijetty/console/.

Source file: FinderServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  resolver=(ContentResolver)getServletContext().getAttribute("org.mortbay.ijetty.contentResolver");
  androidContext=(android.content.Context)config.getServletContext().getAttribute("org.mortbay.ijetty.context");
  locationManager=(LocationManager)androidContext.getSystemService(Context.LOCATION_SERVICE);
  controlThread=new ControlThread();
  controlThread.start();
}
 

Example 46

From project image-resize-servlet, under directory /src/main/java/com/soulgalore/servlet/thumbnail/.

Source file: ThumbnailServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  final String sizes=config.getInitParameter(INIT_PARAMETER_VALID_SIZES);
  final Set<String> validSizes=new HashSet<String>();
  if (sizes != null) {
    final StringTokenizer token=new StringTokenizer(sizes,",");
    while (token.hasMoreTokens()) {
      validSizes.add(token.nextToken());
    }
  }
 else   logger.info("Running " + getServletName() + " without configured valid "+ "sizes, use the servlet init parameter "+ INIT_PARAMETER_VALID_SIZES+ " to set it up.");
  requestParameterName=config.getInitParameter(INIT_PARAMETER_IMG_REQUEST_PARAMETER);
  thumbsDir=config.getInitParameter(INIT_PARAMETER_THUMB_WEB_DIR);
  originalsDir=config.getInitParameter(INIT_PARAMETER_ORIGINAL_WEB_DIR);
  factory=new ThumbnailFetcher(getServletContext().getRealPath("/") + originalsDir,getServletContext().getRealPath("/" + thumbsDir),validSizes);
  logger.info(getServletName() + " is configured with request parameter name:" + requestParameterName+ " originalsDir:"+ originalsDir+ " thumbDir:"+ thumbsDir+ " and valid sizes:"+ (sizes == null ? "" : sizes));
}
 

Example 47

From project isohealth, under directory /Oauth/java/example/oauth-provider/src/net/oauth/example/provider/core/.

Source file: SampleOAuthProvider.java

  15 
vote

public static synchronized void loadConsumers(ServletConfig config) throws IOException {
  Properties p=consumerProperties;
  if (p == null) {
    p=new Properties();
    String resourceName="/" + SampleOAuthProvider.class.getPackage().getName().replace(".","/") + "/provider.properties";
    URL resource=SampleOAuthProvider.class.getClassLoader().getResource(resourceName);
    if (resource == null) {
      throw new IOException("resource not found: " + resourceName);
    }
    InputStream stream=resource.openStream();
    try {
      p.load(stream);
    }
  finally {
      stream.close();
    }
  }
  consumerProperties=p;
  for (  Map.Entry prop : p.entrySet()) {
    String consumer_key=(String)prop.getKey();
    if (!consumer_key.contains(".")) {
      String consumer_secret=(String)prop.getValue();
      if (consumer_secret != null) {
        String consumer_description=(String)p.getProperty(consumer_key + ".description");
        String consumer_callback_url=(String)p.getProperty(consumer_key + ".callbackURL");
        OAuthConsumer consumer=new OAuthConsumer(consumer_callback_url,consumer_key,consumer_secret,null);
        consumer.setProperty("name",consumer_key);
        consumer.setProperty("description",consumer_description);
        ALL_CONSUMERS.put(consumer_key,consumer);
      }
    }
  }
}
 

Example 48

From project jboss-jsf-api_spec, under directory /src/main/java/javax/faces/webapp/.

Source file: FacesServlet.java

  15 
vote

/** 
 * <p>Acquire the factory instances we will require.</p>
 * @throws ServletException if, for any reason, the startup ofthis Faces application failed.  This includes errors in the config file that is parsed before or during the processing of this <code>init()</code> method.
 */
public void init(ServletConfig servletConfig) throws ServletException {
  this.servletConfig=servletConfig;
  try {
    facesContextFactory=(FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
  }
 catch (  FacesException e) {
    ResourceBundle rb=LOGGER.getResourceBundle();
    String msg=rb.getString("severe.webapp.facesservlet.init_failed");
    Throwable rootCause=(e.getCause() != null) ? e.getCause() : e;
    LOGGER.log(Level.SEVERE,msg,rootCause);
    throw new UnavailableException(msg);
  }
  try {
    LifecycleFactory lifecycleFactory=(LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
    String lifecycleId;
    if (null == (lifecycleId=servletConfig.getInitParameter(LIFECYCLE_ID_ATTR))) {
      lifecycleId=servletConfig.getServletContext().getInitParameter(LIFECYCLE_ID_ATTR);
    }
    if (lifecycleId == null) {
      lifecycleId=LifecycleFactory.DEFAULT_LIFECYCLE;
    }
    lifecycle=lifecycleFactory.getLifecycle(lifecycleId);
    initHttpMethodValidityVerification();
  }
 catch (  FacesException e) {
    Throwable rootCause=e.getCause();
    if (rootCause == null) {
      throw e;
    }
 else {
      throw new ServletException(e.getMessage(),rootCause);
    }
  }
}
 

Example 49

From project jbossportletbridge, under directory /core/portletbridge-impl/src/main/java/org/jboss/portletbridge/bridge/scope/.

Source file: BridgeRequestScopeUtil.java

  15 
vote

public static boolean isExcludedByDefinition(String key,Object value){
  if (null != value && (value instanceof PortletConfig || value instanceof PortletContext || value instanceof PortletRequest|| value instanceof PortletResponse|| value instanceof PortletSession|| value instanceof PortletPreferences|| value instanceof PortalContext|| value instanceof FacesContext|| value instanceof ExternalContext|| value instanceof ServletConfig|| value instanceof ServletContext|| value instanceof ServletRequest|| value instanceof ServletResponse|| value instanceof HttpSession)) {
    return true;
  }
  return isNamespaceMatch(key,"javax.portlet.") || isNamespaceMatch(key,"javax.portlet.faces.") || isNamespaceMatch(key,"javax.faces.")|| isNamespaceMatch(key,"javax.servlet.")|| isNamespaceMatch(key,"javax.servlet.include.")|| isNamespaceMatch(key,AbstractExternalContext.INITIAL_REQUEST_ATTRIBUTES_NAMES);
}
 

Example 50

From project jentrata-msh, under directory /Commons/src/main/java/hk/hku/cecid/piazza/commons/servlet/http/.

Source file: HttpDispatcher.java

  15 
vote

/** 
 * Initializes the servlet.
 * @param config the ServletConfig.
 * @throws ServletException if error occurred in initialization.
 */
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  servletConfig=config;
  String contextId=servletConfig.getInitParameter("context-id");
  dispatcherContext=HttpDispatcherContext.getContext(contextId);
  if (dispatcherContext == null) {
    dispatcherContext=HttpDispatcherContext.getDefaultContext();
  }
  Sys.main.log.info(servletConfig.getServletName() + " initialized successfully");
}
 

Example 51

From project jetty-project, under directory /example-async-rest-webapp/src/main/java/org/mortbay/demo/.

Source file: AsyncRestServlet.java

  15 
vote

public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);
  _client=new HttpClient();
  _client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
  try {
    _client.start();
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
}
 

Example 52

From project jforum2, under directory /src/net/jforum/.

Source file: JForum.java

  15 
vote

/** 
 * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
 */
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  super.startApplication();
  isDatabaseUp=ForumStartup.startDatabase();
  try {
    Connection conn=DBConnection.getImplementation().getConnection();
    conn.setAutoCommit(!SystemGlobals.getBoolValue(ConfigKeys.DATABASE_USE_TRANSACTIONS));
    MySQLVersionWorkarounder dw=new MySQLVersionWorkarounder();
    dw.handleWorkarounds(conn);
    JForumExecutionContext ex=JForumExecutionContext.get();
    ex.setConnection(conn);
    JForumExecutionContext.set(ex);
    ForumStartup.startForumRepository();
    RankingRepository.loadRanks();
    SmiliesRepository.loadSmilies();
    BanlistRepository.loadBanlist();
  }
 catch (  Throwable e) {
    e.printStackTrace();
    throw new ForumStartupException("Error while starting jforum",e);
  }
 finally {
    JForumExecutionContext.finish();
  }
}
 

Example 53

From project jsfunit, under directory /jboss-jsfunit-microdeployer/src/main/java/org/jboss/jsfunit/microdeployer/.

Source file: XSLFacadeServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  InputStream in=getClass().getClassLoader().getResourceAsStream("cactus-report.xsl");
  DataInputStream dataStream=new DataInputStream(in);
  try {
    byte[] data=new byte[in.available()];
    dataStream.readFully(data);
    this.xsl=new String(data);
  }
 catch (  IOException e) {
    throw new ServletException(e);
  }
}
 

Example 54

From project jspwiki, under directory /src/org/apache/wiki/attachment/.

Source file: AttachmentServlet.java

  15 
vote

/** 
 * Initializes the servlet from WikiEngine properties. {@inheritDoc}
 */
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  m_engine=WikiEngine.getInstance(config);
  Properties props=m_engine.getWikiProperties();
  m_attachmentProvider=new AttachmentDavProvider(m_engine);
  m_tmpDir=m_engine.getWorkDir() + File.separator + "attach-tmp";
  m_maxSize=TextUtil.getIntegerProperty(props,AttachmentManager.PROP_MAXSIZE,Integer.MAX_VALUE);
  String allowed=TextUtil.getStringProperty(props,AttachmentManager.PROP_ALLOWEDEXTENSIONS,null);
  if (allowed != null && allowed.length() > 0)   m_allowedPatterns=allowed.toLowerCase().split("\\s");
 else   m_allowedPatterns=new String[0];
  String forbidden=TextUtil.getStringProperty(props,AttachmentManager.PROP_FORDBIDDENEXTENSIONS,null);
  if (forbidden != null && forbidden.length() > 0)   m_forbiddenPatterns=forbidden.toLowerCase().split("\\s");
 else   m_forbiddenPatterns=new String[0];
  File f=new File(m_tmpDir);
  if (!f.exists()) {
    f.mkdirs();
  }
 else   if (!f.isDirectory()) {
    log.fatal("A file already exists where the temporary dir is supposed to be: " + m_tmpDir + ".  Please remove it.");
  }
  log.debug("UploadServlet initialized. Using " + m_tmpDir + " for temporary storage.");
}
 

Example 55

From project Kairos, under directory /src/java/org/apache/nutch/searcher/.

Source file: OpenSearchServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  try {
    this.conf=NutchConfiguration.get(config.getServletContext());
    bean=NutchBean.get(config.getServletContext(),this.conf);
  }
 catch (  IOException e) {
    throw new ServletException(e);
  }
  MAX_HITS_PER_PAGE=conf.getInt("searcher.max.hits.per.page",-1);
}
 

Example 56

From project kernel_1, under directory /exo.kernel.container/src/main/java/org/exoplatform/container/web/.

Source file: AbstractHttpServlet.java

  15 
vote

/** 
 * {@inheritDoc}
 */
public final void init(ServletConfig config) throws ServletException {
  super.init(config);
  this.config=config;
  this.servletContextName=config.getServletContext().getServletContextName();
  afterInit(config);
}
 

Example 57

From project kevoree-library, under directory /javase/org.kevoree.library.javase.webserver.wordpress/src/main/java/org/kevoree/library/javase/webserver/wordpress/.

Source file: WordPressPage.java

  15 
vote

/** 
 * initialize the script manager.
 */
public void init(ServletConfig config) throws ServletException {
  _config=config;
  _servletContext=config.getServletContext();
  Path pwd=new FilePath(rootDir.getAbsolutePath());
  getQuercus().setPwd(pwd);
  getQuercus().init();
  getQuercus().start();
}
 

Example 58

From project lesscss4j, under directory /src/main/java/org/localmatters/lesscss4j/servlet/.

Source file: LessCssServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  Integer cacheMillis=getInitParameterInteger(config,CACHE_MILLISECONDS_PARAM_NAME);
  if (cacheMillis != null) {
    setCacheMillis(cacheMillis);
  }
  Integer httpCacheMillis=getInitParameterInteger(config,HTTP_CACHE_MILLISECONDS_PARAM_NAME);
  if (httpCacheMillis != null) {
    setHttpCacheMillis(httpCacheMillis);
  }
  Boolean etagEnabled=getInitParameterBoolean(config,USE_ETAG);
  if (etagEnabled != null && !etagEnabled) {
    _useETag=false;
  }
  DefaultLessCssCompilerFactory factory=new DefaultLessCssCompilerFactory();
  Boolean prettyPrint=getInitParameterBoolean(config,PRETTY_PRINT_PARAM_NAME);
  if (prettyPrint != null) {
    factory.setPrettyPrintEnabled(prettyPrint);
  }
  _lessCompiler=factory.create();
}
 

Example 59

From project m2eclipse-wtp, under directory /org.maven.ide.eclipse.wtp.tests/projects/WebResourceFiltering/example-web/src/main/java/org/eclipse/m2eclipse/example/.

Source file: DefaultServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  Enumeration<String> ctxParamNames=config.getInitParameterNames();
  while (ctxParamNames.hasMoreElements()) {
    String paramName=ctxParamNames.nextElement();
    String paramValue=config.getInitParameter(paramName);
    System.out.println("Servlet: Context-Param: " + paramName + " = "+ paramValue);
  }
}
 

Example 60

From project milton, under directory /milton/examples/caldav-non-spring-netbeans/src/java/com/ettrema/http/caldav/demo/servlet/.

Source file: CaldavMiltonServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  TResourceFactory demoResourceFactory=new com.ettrema.http.caldav.demo.TResourceFactory();
  WebDavResourceTypeHelper rth=new com.bradmcevoy.http.webdav.WebDavResourceTypeHelper();
  CalendarResourceTypeHelper crth=new com.ettrema.http.caldav.CalendarResourceTypeHelper(new com.ettrema.http.acl.AccessControlledResourceTypeHelper(rth));
  AuthenticationService authService=new com.bradmcevoy.http.AuthenticationService();
  HandlerHelper hh=new com.bradmcevoy.http.HandlerHelper(authService);
  DefaultWebDavResponseHandler defaultResponseHandler=new com.bradmcevoy.http.webdav.DefaultWebDavResponseHandler(authService,crth);
  Http11Protocol http11=new com.bradmcevoy.http.http11.Http11Protocol(defaultResponseHandler,hh);
  WebDavProtocol webdav=new com.bradmcevoy.http.webdav.WebDavProtocol(hh,crth,defaultResponseHandler,new ArrayList<PropertySource>());
  CalDavProtocol caldav=new com.ettrema.http.caldav.CalDavProtocol(demoResourceFactory,defaultResponseHandler,hh,webdav);
  List<WellKnownResourceFactory.WellKnownHandler> wellKnownHandlers=new ArrayList<WellKnownResourceFactory.WellKnownHandler>();
  wellKnownHandlers.add(caldav);
  WellKnownResourceFactory wellKnownResourceFactory=new WellKnownResourceFactory(demoResourceFactory,wellKnownHandlers);
  ACLProtocol acl=new com.ettrema.http.acl.ACLProtocol(webdav);
  ProtocolHandlers protocols=new com.bradmcevoy.http.ProtocolHandlers(Arrays.asList(http11,webdav,caldav,acl));
  httpManager=new com.bradmcevoy.http.HttpManager(wellKnownResourceFactory,defaultResponseHandler,protocols);
}
 

Example 61

From project milton2, under directory /examples/caldav-non-spring-netbeans/src/java/com/ettrema/http/caldav/demo/servlet/.

Source file: CaldavMiltonServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  TResourceFactory demoResourceFactory=new com.ettrema.http.caldav.demo.TResourceFactory();
  WebDavResourceTypeHelper rth=new com.bradmcevoy.http.webdav.WebDavResourceTypeHelper();
  CalendarResourceTypeHelper crth=new com.ettrema.http.caldav.CalendarResourceTypeHelper(new com.ettrema.http.acl.AccessControlledResourceTypeHelper(rth));
  AuthenticationService authService=new com.bradmcevoy.http.AuthenticationService();
  HandlerHelper hh=new com.bradmcevoy.http.HandlerHelper(authService);
  DefaultWebDavResponseHandler defaultResponseHandler=new com.bradmcevoy.http.webdav.DefaultWebDavResponseHandler(authService,crth);
  Http11Protocol http11=new com.bradmcevoy.http.http11.Http11Protocol(defaultResponseHandler,hh);
  WebDavProtocol webdav=new com.bradmcevoy.http.webdav.WebDavProtocol(hh,crth,defaultResponseHandler,new ArrayList<PropertySource>());
  CalDavProtocol caldav=new com.ettrema.http.caldav.CalDavProtocol(demoResourceFactory,defaultResponseHandler,hh,webdav);
  List<WellKnownResourceFactory.WellKnownHandler> wellKnownHandlers=new ArrayList<WellKnownResourceFactory.WellKnownHandler>();
  wellKnownHandlers.add(caldav);
  WellKnownResourceFactory wellKnownResourceFactory=new WellKnownResourceFactory(demoResourceFactory,wellKnownHandlers);
  ACLProtocol acl=new com.ettrema.http.acl.ACLProtocol(webdav);
  ProtocolHandlers protocols=new com.bradmcevoy.http.ProtocolHandlers(Arrays.asList(http11,webdav,caldav,acl));
  httpManager=new com.bradmcevoy.http.HttpManager(wellKnownResourceFactory,defaultResponseHandler,protocols);
}
 

Example 62

From project Mobile-Tour-Guide, under directory /zxing-2.0/zxingorg/src/com/google/zxing/web/.

Source file: DecodeServlet.java

  15 
vote

@Override public void init(ServletConfig servletConfig){
  Logger logger=Logger.getLogger("com.google.zxing");
  logger.addHandler(new ServletContextLogHandler(servletConfig.getServletContext()));
  params=new BasicHttpParams();
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  registry=new SchemeRegistry();
  registry.register(new Scheme("http",80,PlainSocketFactory.getSocketFactory()));
  registry.register(new Scheme("https",443,SSLSocketFactory.getSocketFactory()));
  diskFileItemFactory=new DiskFileItemFactory();
  log.info("DecodeServlet configured");
}
 

Example 63

From project moho, under directory /moho-impl/src/main/java/com/voxeo/moho/http/.

Source file: HttpController.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  _framework=(SpiFramework)getServletContext().getAttribute(ApplicationContext.FRAMEWORK);
  if (_framework.getDriverByProtocolFamily(ProtocolDriver.PROTOCOL_HTTP) == null) {
    try {
      _framework.registerDriver(ProtocolDriver.PROTOCOL_HTTP,IMifiedDriver.class.getName());
    }
 catch (    Exception e) {
      throw new ServletException(e);
    }
  }
  ((ApplicationContextImpl)_framework).setHTTPController(this);
  _driver=(HTTPDriver)_framework.getDriverByProtocolFamily(ProtocolDriver.PROTOCOL_HTTP);
  _driver.init(_framework);
}
 

Example 64

From project ning-service-skeleton, under directory /utils/src/main/java/com/ning/jetty/utils/servlets/.

Source file: HttpProxyServlet.java

  15 
vote

@Override public void init(final ServletConfig config) throws ServletException {
  this.config=config;
  final AsyncHttpClientConfig.Builder builder=new AsyncHttpClientConfig.Builder();
  builder.setMaximumConnectionsPerHost(-1);
  builder.setAllowPoolingConnection(true);
  builder.setExecutorService(Executors.newCachedThreadPool("HttpProxyServlet-AsyncHttpClient"));
  builder.setUserAgent("ning-service/1.0");
  client=new AsyncHttpClient(builder.build());
  config.getServletContext().log("Created new HttpProxyServlet");
}
 

Example 65

From project nuxeo-opensocial, under directory /nuxeo-opensocial-container/src/main/java/org/nuxeo/opensocial/container/server/guice/.

Source file: WebEngineDispatchServiceServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    Class.forName("com.google.gwt.dev.HostedMode");
    HOSTED_MODE=true;
  }
 catch (  Exception e) {
    HOSTED_MODE=false;
  }
}
 

Example 66

From project nuxeo-webengine, under directory /nuxeo-webengine-gwt/src/main/java/org/nuxeo/ecm/webengine/gwt/.

Source file: WebEngineGwtServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    Class.forName("com.google.gwt.dev.HostedMode");
    HOSTED_MODE=true;
  }
 catch (  Exception e) {
    HOSTED_MODE=false;
  }
}
 

Example 67

From project OAuth2.0ProviderForJava, under directory /provider-example/src/main/java/net/oauth/v2/example/provider/servlets/.

Source file: AuthorizationServlet2.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    SampleOAuth2Provider.loadConsumers();
  }
 catch (  Exception e) {
    System.out.println("You could not load consumer data.");
  }
}
 

Example 68

From project openclaws, under directory /cat/WEB-INF/src/edu/rit/its/claws/cat/servlet/.

Source file: SubscriberControl.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    loadSubscribers(config);
  }
 catch (  FileNotFoundException e) {
    throw new ServletException(e);
  }
catch (  MalformedURLException e) {
    throw new ServletException(e);
  }
}
 

Example 69

From project OpenReports, under directory /src/org/efs/openreports/dispatcher/.

Source file: FileDispatcher.java

  15 
vote

public void init(ServletConfig servletConfig) throws ServletException {
  ApplicationContext appContext=WebApplicationContextUtils.getRequiredWebApplicationContext(servletConfig.getServletContext());
  directoryProvider=(DirectoryProvider)appContext.getBean("directoryProvider",DirectoryProvider.class);
  imageDirectory=directoryProvider.getReportImageDirectory();
  imageTempDirectory=directoryProvider.getTempDirectory();
  reportGenerationDirectory=directoryProvider.getReportGenerationDirectory();
  super.init(servletConfig);
  log.info("Started...");
}
 

Example 70

From project OpenTripPlanner, under directory /opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/servlet/.

Source file: ApiServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  ServletContext servletContext=config.getServletContext();
  WebApplicationContext webApplicationContext=WebApplicationContextUtils.getWebApplicationContext(servletContext);
  AutowireCapableBeanFactory autowireCapableBeanFactory=webApplicationContext.getAutowireCapableBeanFactory();
  autowireCapableBeanFactory.autowireBean(this);
  if (updater != null)   updater.start();
}
 

Example 71

From project org.ops4j.pax.vaadin, under directory /pax-vaadin-service/src/main/java/org/ops4j/pax/vaadin/internal/servlet/.

Source file: VaadinApplicationServlet.java

  15 
vote

@Override public void init(final ServletConfig config) throws ServletException {
  try {
    ContextClassLoaderUtils.doWithClassLoader(classLoader,new Callable<Void>(){
      public Void call() throws Exception {
        servlet.init(config);
        return null;
      }
    }
);
  }
 catch (  ServletException e) {
    throw e;
  }
catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception ignore) {
  }
}
 

Example 72

From project org.ops4j.pax.web, under directory /pax-web-jsp/src/main/java/org/apache/jasper/servlet/.

Source file: JspServletWrapper.java

  15 
vote

JspServletWrapper(ServletConfig config,Options options,String jspUri,boolean isErrorPage,JspRuntimeContext rctxt) throws JasperException {
  this.isTagFile=false;
  this.config=config;
  this.options=options;
  this.jspUri=jspUri;
  ctxt=new JspCompilationContext(jspUri,isErrorPage,options,config.getServletContext(),this,rctxt);
  String jspFilePath=ctxt.getRealPath(jspUri);
  if (jspFilePath != null) {
    jspFile=new File(jspFilePath);
  }
}
 

Example 73

From project org.ops4j.pax.wicket, under directory /service/src/main/java/org/ops4j/pax/wicket/internal/.

Source file: FilterTracker.java

  15 
vote

public List<Filter> getFiltersSortedWithHighestPriorityAsFirstFilter(ServletConfig servletConfig){
  FilterFactoryReference[] factories;
synchronized (this) {
    factories=filterFactories.values().toArray(new FilterFactoryReference[0]);
  }
  List<Filter> filters=new ArrayList<Filter>();
  LOGGER.debug("Retrieved {} factories to create filters to apply",factories.length);
  Arrays.sort(factories);
  for (  FilterFactoryReference filterFactory : factories) {
    try {
      filters.add(filterFactory.getFilter(servletConfig));
    }
 catch (    ServletException e) {
      LOGGER.error("Problem while creating filter: {}",e.getMessage(),e);
    }
catch (    RuntimeException e) {
      LOGGER.error("Problem while creating filter: {}",e.getMessage(),e);
    }
  }
  return filters;
}
 

Example 74

From project osw-openfire-plugin, under directory /src/java/org/onesocialweb/openfire/web/.

Source file: FileServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  AuthCheckFilter.addExclude("osw-openfire-plugin");
  AuthCheckFilter.addExclude("osw-openfire-plugin/file/");
  AuthCheckFilter.addExclude("osw-openfire-plugin/form.html");
}
 

Example 75

From project projectsonar, under directory /src/edu/kit/ipd/sonar/server/.

Source file: RPCServiceImpl.java

  15 
vote

/** 
 * Main initialization method.
 * @param config The configuration as provided by the servlet container.
 * @throws ServletException If the service cannot be started for somereasion
 */
public void init(final ServletConfig config) throws ServletException {
  super.init(config);
  log.info("server started");
  try {
    database=DatabaseFactory.createInstance(Configuration.getInstance());
  }
 catch (  DataException de) {
    throw new ServletException(de);
  }
  globalCalculator=CalculatorFactory.createCalculatorForGlobalGraphs();
  peerCalculator=CalculatorFactory.createCalculatorForPeerGraphs();
  loader=CentralityLoader.createInstance();
  loader.reload();
  for (  CentralityImpl c : loader.getAvailableCentralities()) {
    mapping.put(c.hashCode(),c);
  }
}
 

Example 76

From project proxy-servlet, under directory /src/main/java/com/woonoz/proxy/servlet/.

Source file: ProxyServlet.java

  15 
vote

@Override public void init(ServletConfig servletConfig) throws ServletException {
  try {
    ProxyServletConfig config=new ProxyServletConfig(servletConfig);
    init(config);
  }
 catch (  IOException e) {
    throw new ServletException(e);
  }
}
 

Example 77

From project quickstart, under directory /TXBridge/demo/client/src/main/java/org/jboss/jbossts/txbridge/demo/client/.

Source file: BasicClient.java

  15 
vote

/** 
 * Initialise the servlet.
 * @param config The servlet configuration.
 */
public void init(final ServletConfig config) throws ServletException {
  try {
    URL wsdlLocation=new URL("http://localhost:8080/txbridge-demo-service/BistroImpl?wsdl");
    QName serviceName=new QName("http://bistro.demo.txbridge.jbossts.jboss.org/","BistroImplService");
    QName portName=new QName("http://bistro.demo.txbridge.jbossts.jboss.org/","BistroImplPort");
    Service service=Service.create(wsdlLocation,serviceName);
    bistro=service.getPort(portName,Bistro.class);
    BindingProvider bindingProvider=(BindingProvider)bistro;
    List<Handler> handlers=new ArrayList<Handler>(1);
    handlers.add(new JaxWSHeaderContextProcessor());
    bindingProvider.getBinding().setHandlerChain(handlers);
    context=config.getServletContext();
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
}
 

Example 78

From project Red5, under directory /src/org/red5/server/net/servlet/.

Source file: AMFTunnelServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  if (config.getInitParameter("tunnel.acceptor.url") != null) {
    postAcceptorURL=config.getInitParameter("tunnel.acceptor.url");
  }
  log.debug("POST acceptor URL: {}",postAcceptorURL);
  if (config.getInitParameter("tunnel.timeout") != null) {
    connectionTimeout=Integer.valueOf(config.getInitParameter("tunnel.timeout"));
  }
  log.debug("POST connection timeout: {}",postAcceptorURL);
}
 

Example 79

From project red5-mavenized, under directory /red5_base/src/main/java/org/red5/server/net/servlet/.

Source file: AMFTunnelServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  if (config.getInitParameter("tunnel.acceptor.url") != null) {
    postAcceptorURL=config.getInitParameter("tunnel.acceptor.url");
  }
  logger.debug("POST acceptor URL: {}",postAcceptorURL);
  if (config.getInitParameter("tunnel.timeout") != null) {
    connectionTimeout=Integer.valueOf(config.getInitParameter("tunnel.timeout"));
  }
  logger.debug("POST connection timeout: {}",postAcceptorURL);
}
 

Example 80

From project red5-server, under directory /src/org/red5/server/net/servlet/.

Source file: AMFTunnelServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  if (config.getInitParameter("tunnel.acceptor.url") != null) {
    postAcceptorURL=config.getInitParameter("tunnel.acceptor.url");
  }
  log.debug("POST acceptor URL: {}",postAcceptorURL);
  if (config.getInitParameter("tunnel.timeout") != null) {
    connectionTimeout=Integer.valueOf(config.getInitParameter("tunnel.timeout"));
  }
  log.debug("POST connection timeout: {}",postAcceptorURL);
}
 

Example 81

From project remitt, under directory /src/main/java/org/remitt/server/cxf/.

Source file: RemittRemoteServicesServlet.java

  15 
vote

@Override public void loadBus(ServletConfig servletConfig){
  super.loadBus(servletConfig);
  Bus bus=getBus();
  BusFactory.setDefaultBus(bus);
  ServerFactoryBean factory=new ServerFactoryBean();
  factory.setBus(bus);
  factory.getInInterceptors().add(new BasicAuthAuthorizationInterceptor());
  factory.setServiceClass(ServiceImpl.class);
  factory.setAddress("/interface");
  factory.create();
}
 

Example 82

From project sandbox_2, under directory /wicket-cluster/wicket-cluster-jetty/src/main/java/org/apache/wicket/cluster/jetty/.

Source file: JettyBootstrap.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  JettyBootstrap bootstrap=JettyBootstrap.instance;
  bootstrap.contextsToInitialize.remove(config.getServletContext().getContextPath());
  if (bootstrap.contextsToInitialize.isEmpty()) {
    instance.afterServerStarted();
  }
}
 

Example 83

From project security_1, under directory /security-realms/security-kenai-realm/src/test/java/org/sonatype/security/realms/kenai/.

Source file: KenaiMockAuthzServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  String totalProjectsParam=config.getInitParameter(TOTAL_PROJECTS_KEY);
  if (totalProjectsParam != null) {
    totalProjectSize=Integer.parseInt(totalProjectsParam);
  }
}
 

Example 84

From project sensei, under directory /sensei-core/src/main/java/com/senseidb/servlet/.

Source file: SenseiHttpInvokerServiceServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  innerSvc=new ClusteredSenseiServiceImpl(senseiConf,loadBalancerFactory,versionComparator);
  innerSvc.start();
  target=new HttpInvokerServiceExporter();
  target.setService(innerSvc);
  target.setServiceInterface(SenseiService.class);
  target.afterPropertiesSet();
}
 

Example 85

From project Socket.IO-Java, under directory /core/src/main/java/com/glines/socketio/server/transport/.

Source file: FlashSocketTransport.java

  15 
vote

@Override public void init(ServletConfig config){
  flashPolicyServerHost=config.getInitParameter(FLASHPOLICY_SERVER_HOST_KEY);
  flashPolicyDomain=config.getInitParameter(FLASHPOLICY_DOMAIN_KEY);
  flashPolicyPorts=config.getInitParameter(FLASHPOLICY_PORTS_KEY);
  String port=config.getInitParameter(FLASHPOLICY_SERVER_PORT_KEY);
  if (port != null) {
    flashPolicyServerPort=Short.parseShort(port);
  }
  if (flashPolicyServerHost != null && flashPolicyDomain != null && flashPolicyPorts != null) {
    try {
      startFlashPolicyServer();
    }
 catch (    IOException e) {
    }
  }
}
 

Example 86

From project sparqled, under directory /recommendation-servlet/src/main/java/org/sindice/analytics/servlet/.

Source file: AssistedSparqlEditorServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  logger.info("Intialized ASE Servlet");
  final BackendType backend=BackendType.valueOf((String)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.BACKEND));
  final String[] backendArgs=(String[])config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.BACKEND_ARGS);
  final String rankingConfigPath=(String)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.RANKING_CONFIGURATION);
  pagination=(Integer)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.PAGINATION);
  limit=(Integer)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.LIMIT);
  final String[] classAttributes=(String[])config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.CLASS_ATTRIBUTES);
  DataGraphSummaryVocab.setDomainUriPrefix((String)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.DOMAIN_URI_PREFIX));
  DataGraphSummaryVocab.setGraphSummaryGraph((String)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.GRAPH_SUMMARY_GRAPH));
  DataGraphSummaryVocab.setDatasetLabelDefinition(DatasetLabel.valueOf((String)config.getServletContext().getAttribute(AssistedSparqlEditorListener.RECOMMENDER_WRAPPER + AssistedSparqlEditorListener.DATASET_LABEL_DEF)));
  AnalyticsClassAttributes.initClassAttributes(classAttributes);
  try {
    final BufferedInputStream r=new BufferedInputStream(new FileInputStream(rankingConfigPath));
    final LabelsRankingYAMLoader loader=new LabelsRankingYAMLoader(r);
    loader.load();
    labelsRankings.addAll(loader.getConfigurations());
    final DGSQueryResultProcessor qrp=new DGSQueryResultProcessor();
    dgsBackend=SesameBackendFactory.getDgsBackend(backend,qrp,backendArgs);
    dgsBackend.initConnection();
    logger.info("RankingConfiguration={} Backend={} BackendArgs={} ClassAttributes={} Pagination={} DomainUriPrefix={} DatasetLabelDef={} GraphSummaryGraph={} LIMIT={}",new Object[]{rankingConfigPath,backend,Arrays.toString(backendArgs),Arrays.toString(classAttributes),pagination,DataGraphSummaryVocab.DOMAIN_URI_PREFIX,DataGraphSummaryVocab.DATASET_LABEL_DEF,DataGraphSummaryVocab.GRAPH_SUMMARY_GRAPH,limit});
  }
 catch (  Exception e) {
    logger.error("Failed to start the DGS backend",e);
  }
}
 

Example 87

From project sparsemapcontent, under directory /extensions/jaxrs/src/main/java/uk/co/tfd/sm/jaxrs/.

Source file: ResteasyServlet.java

  15 
vote

public void init(ServletConfig servletConfig) throws ServletException {
synchronized (registrationSync) {
    ClassLoader bundleClassloader=this.getClass().getClassLoader();
    ClassLoader contextClassloader=Thread.currentThread().getContextClassLoader();
    try {
      Thread.currentThread().setContextClassLoader(bundleClassloader);
      super.init(servletConfig);
      ServletBootstrap bootstrap=new ServletBootstrap(servletConfig);
      servletContainerDispatcher=new ServletContainerDispatcher();
      servletContainerDispatcher.init(servletConfig.getServletContext(),bootstrap,this,this);
      servletContainerDispatcher.getDispatcher().getDefaultContextObjects().put(ServletConfig.class,servletConfig);
    }
  finally {
      Thread.currentThread().setContextClassLoader(contextClassloader);
    }
    Registry registry=getRegistry();
    for (    JaxRestService service : pendingServices) {
      LOGGER.info("Registering JaxRestService {} ",service);
      registry.addSingletonResource(service);
    }
    pendingServices.clear();
  }
}
 

Example 88

From project spring-flex, under directory /spring-flex-core/src/main/java/org/springframework/flex/config/.

Source file: FlexConfigurationManager.java

  15 
vote

/** 
 * Parses the BlazeDS config files and returns a populated MessagingConfiguration
 * @param servletConfig the servlet config for the web application
 */
@SuppressWarnings("unchecked") public MessagingConfiguration getMessagingConfiguration(ServletConfig servletConfig){
  Assert.isTrue(JdkVersion.getMajorJavaVersion() >= JdkVersion.JAVA_15,"Spring BlazeDS Integration requires a minimum of Java 1.5");
  Assert.notNull(servletConfig,"FlexConfigurationManager requires a non-null ServletConfig - " + "Is it being used outside a WebApplicationContext?");
  MessagingConfiguration configuration=new MessagingConfiguration();
  configuration.getSecuritySettings().setServerInfo(servletConfig.getServletContext().getServerInfo());
  if (CollectionUtils.isEmpty(configuration.getSecuritySettings().getLoginCommands())) {
    LoginCommandSettings settings=new LoginCommandSettings();
    settings.setClassName(NoOpLoginCommand.class.getName());
    configuration.getSecuritySettings().getLoginCommands().put(LoginCommandSettings.SERVER_MATCH_OVERRIDE,settings);
  }
  if (this.parser == null) {
    this.parser=getDefaultConfigurationParser();
  }
  Assert.notNull(this.parser,"Unable to create a parser to load Flex messaging configuration.");
  this.parser.parse(this.configurationPath,new ResourceResolverAdapter(this.resourceLoader),configuration);
  return configuration;
}
 

Example 89

From project SpringSecurityDemo, under directory /src/main/java/com/github/peholmst/springsecuritydemo/servlet/.

Source file: SpringApplicationServlet.java

  15 
vote

@SuppressWarnings("unchecked") @Override public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);
  applicationBean=servletConfig.getInitParameter("applicationBean");
  if (applicationBean == null) {
    if (logger.isErrorEnabled()) {
      logger.error("ApplicationBean not specified in servlet parameters");
    }
    throw new ServletException("ApplicationBean not specified in servlet parameters");
  }
  if (logger.isInfoEnabled()) {
    logger.info("Using applicationBean '" + applicationBean + "'");
  }
  applicationContext=WebApplicationContextUtils.getWebApplicationContext(servletConfig.getServletContext());
  if (applicationContext.isSingleton(applicationBean)) {
    if (logger.isErrorEnabled()) {
      logger.error("ApplicationBean must not be a singleton");
    }
    throw new ServletException("ApplicationBean must not be a singleton");
  }
  if (!applicationContext.isPrototype(applicationBean) && logger.isWarnEnabled()) {
    logger.warn("ApplicationBean is not a prototype");
  }
  applicationClass=(Class<? extends Application>)applicationContext.getType(applicationBean);
  if (logger.isDebugEnabled()) {
    logger.debug("Vaadin application class is [" + applicationClass + "]");
  }
  initLocaleResolver(applicationContext);
}
 

Example 90

From project teatrove, under directory /teaservlet/src/main/java/org/teatrove/teaservlet/.

Source file: TeaServlet.java

  15 
vote

private ServletContext setServletContext(ServletConfig config){
  ServletContext context=new FilteredServletContext(config.getServletContext()){
    public Object getAttribute(    String name){
      if (name == TeaServlet.class.getName()) {
        return TeaServlet.this;
      }
 else {
        return super.getAttribute(name);
      }
    }
  }
;
  return context;
}
 

Example 91

From project tesb-rt-se, under directory /job/console/src/main/java/org/talend/esb/job/console/.

Source file: DeployServlet.java

  15 
vote

public void init(ServletConfig servletConfig) throws ServletException {
  ServletContext context=servletConfig.getServletContext();
  bundleContext=(BundleContext)context.getAttribute("osgi-bundlecontext");
  tmpDir=new File(System.getProperty("java.io.tmpdir"));
  deployDir=new File(System.getProperty("karaf.base") + "/deploy");
  if (!deployDir.exists()) {
    deployDir.mkdirs();
  }
}
 

Example 92

From project turismo, under directory /src/main/java/com/ghosthack/turismo/servlet/.

Source file: Servlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init();
  context=config.getServletContext();
  final String routesParam=config.getInitParameter(ROUTES);
  try {
    routes=createInstance(routesParam,Routes.class);
  }
 catch (  ClassForNameException e) {
    throw new ServletException(e);
  }
}
 

Example 93

From project turmeric-monitoring, under directory /mgmt-console/src/main/java/org/ebayopensource/turmeric/monitoring/server/.

Source file: DownloadServlet.java

  15 
vote

/** 
 * Inits the servlet.
 * @param config the config
 * @throws ServletException the servlet exception
 * @see javax.servlet.GenericServlet#init(javax.servlet.ServletConfig)
 */
@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  this.config=config;
  this.context=config.getServletContext();
  String[] ids=TimeZone.getAvailableIDs(0);
  gmt=TimeZone.getTimeZone(ids[0]);
  gmtFormat=new SimpleDateFormat("yyyy MM dd hh:00");
  gmtFormat.setTimeZone(gmt);
  if (config.getInitParameter("SOAMetricsQueryServiceURL") != null)   metricsQueryServiceURL=config.getInitParameter("SOAMetricsQueryServiceURL");
  if (config.getInitParameter("myPrefix") != null)   myPrefix=config.getInitParameter("myPrefix");
  System.err.println("myPrefix=" + myPrefix);
  client=new HttpClient();
  client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
  try {
    client.start();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
 

Example 94

From project twitter-2-weibo, under directory /core/src/main/java/h2weibo/.

Source file: InitServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  Properties properties=new Properties();
  try {
    properties.load(this.getClass().getClassLoader().getResourceAsStream("config.properties"));
    System.setProperty("h2weibo.admin.user",properties.getProperty("admin",""));
    System.setProperty("twitter4j.oauth.consumerKey",properties.getProperty("twitter_key",""));
    System.setProperty("twitter4j.oauth.consumerSecret",properties.getProperty("twitter_secret",""));
  }
 catch (  IOException e) {
    log.error(e);
  }
  System.setProperty("weibo4j.debug","false");
  log.info("System initialized.");
  getServletContext().setAttribute(CONTEXT_JEDIS_POOL,createJedisPool());
}
 

Example 95

From project usergrid-stack, under directory /rest/src/main/java/org/usergrid/rest/.

Source file: SwaggerServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  logger.info("init(ServletConfig config)");
  if (sc == null) {
    sc=config.getServletContext();
  }
  properties=(Properties)getSpringBeanFromWeb("properties");
  loadSwagger();
}
 

Example 96

From project v7files, under directory /src/main/java/v7db/files/buckets/.

Source file: BucketsServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  try {
    properties.init();
    bucketCollection=properties.getBucketCollection();
    storage=properties.getContentStorage();
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
}
 

Example 97

From project vaadin, under directory /impl/src/main/java/br/gov/frameworkdemoiselle/vaadin/servlet/.

Source file: VaadinApplicationServlet.java

  15 
vote

@Override @SuppressWarnings({"unchecked"}) public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);
  if (beanManager == null) {
    beanManager=(BeanManager)getServletContext().getAttribute(BeanManager.class.getName());
  }
  try {
    injectionTarget=(InjectionTarget<VaadinApplication>)beanManager.createInjectionTarget(beanManager.createAnnotatedType(getApplicationClass()));
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
}
 

Example 98

From project virgo.kernel, under directory /org.eclipse.virgo.management.console/src/main/java/org/eclipse/virgo/management/console/.

Source file: ContentServlet.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  String prefix=config.getInitParameter(CONTENT_SERVLET_PREFIX);
  String suffix=config.getInitParameter(CONTENT_SERVLET_SUFFIX);
  this.urlFetcher=new ContentURLFetcher(config.getServletContext(),prefix,suffix);
}
 

Example 99

From project virgo.web, under directory /org.eclipse.virgo.web.dm/src/main/java/org/eclipse/virgo/web/dm/.

Source file: ServerOsgiBundleXmlWebApplicationContext.java

  15 
vote

/** 
 * {@inheritDoc}
 */
public void setServletConfig(ServletConfig servletConfig){
  this.servletConfig=servletConfig;
  if (servletConfig != null) {
    if (getServletContext() == null) {
      setServletContext(servletConfig.getServletContext());
    }
    if (getNamespace() == null) {
      setNamespace(servletConfig.getServletName() + DEFAULT_NAMESPACE_SUFFIX);
    }
  }
}
 

Example 100

From project vmarket, under directory /src/main/java/org/apache/velocity/servlet/.

Source file: VelocityServlet.java

  15 
vote

/** 
 * Initializes the Velocity runtime, first calling loadConfiguration(ServletConvig) to get a java.util.Properties of configuration information and then calling Velocity.init().  Override this to do anything to the environment before the initialization of the singelton takes place, or to initialize the singleton in other ways.
 * @param config
 * @throws ServletException
 */
protected void initVelocity(ServletConfig config) throws ServletException {
  try {
    Properties props=loadConfiguration(config);
    Velocity.init(props);
  }
 catch (  Exception e) {
    throw new ServletException("Error initializing Velocity: " + e,e);
  }
}
 

Example 101

From project Weave, under directory /WeaveServices/src/weave/servlets/.

Source file: AdminService.java

  15 
vote

public void init(ServletConfig config) throws ServletException {
  super.init(config);
  configManager=SQLConfigManager.getInstance(config.getServletContext());
  tempPath=configManager.getContextParams().getTempPath();
  uploadPath=configManager.getContextParams().getUploadPath();
  docrootPath=configManager.getContextParams().getDocrootPath();
}
 

Example 102

From project webutilities, under directory /src/main/java/com/googlecode/webutilities/servlets/.

Source file: JSCSSMergeServlet.java

  15 
vote

@Override public void init(ServletConfig config) throws ServletException {
  super.init(config);
  this.expiresMinutes=readLong(config.getInitParameter(INIT_PARAM_EXPIRES_MINUTES),this.expiresMinutes);
  this.cacheControl=config.getInitParameter(INIT_PARAM_CACHE_CONTROL) != null ? config.getInitParameter(INIT_PARAM_CACHE_CONTROL) : this.cacheControl;
  this.autoCorrectUrlsInCSS=readBoolean(config.getInitParameter(INIT_PARAM_AUTO_CORRECT_URLS_IN_CSS),this.autoCorrectUrlsInCSS);
  this.turnOfETag=readBoolean(config.getInitParameter(INIT_PARAM_TURN_OFF_E_TAG),this.turnOfETag);
  this.turnOfUrlFingerPrinting=readBoolean(config.getInitParameter(INIT_PARAM_TURN_OFF_URL_FINGERPRINTING),this.turnOfUrlFingerPrinting);
  this.customContextPathForCSSUrls=config.getInitParameter(INIT_PARAM_CUSTOM_CONTEXT_PATH_FOR_CSS_URLS);
  LOGGER.debug("Servlet initialized: {\n\t{}:{},\n\t{}:{},\n\t{}:{},\n\t{}:{}\n\t{}:{}\n}",new Object[]{INIT_PARAM_EXPIRES_MINUTES,String.valueOf(this.expiresMinutes),INIT_PARAM_CACHE_CONTROL,this.cacheControl,INIT_PARAM_AUTO_CORRECT_URLS_IN_CSS,String.valueOf(this.autoCorrectUrlsInCSS),INIT_PARAM_TURN_OFF_E_TAG,String.valueOf(this.turnOfETag),INIT_PARAM_TURN_OFF_URL_FINGERPRINTING,String.valueOf(this.turnOfUrlFingerPrinting)});
}