Package javax.servlet

Examples of javax.servlet.ServletConfig


        }
    }

    private synchronized HttpListener getService() {
        if (service == null) {
            ServletConfig config = getServletConfig();
            String webServiceContainerId = config.getInitParameter(WEBSERVICE_CONTAINER);
            if (webServiceContainerId != null) {
                service = (HttpListener) config.getServletContext().getAttribute(webServiceContainerId);
            }
        }
        return service;
    }
View Full Code Here


        container.setServletContext(this.servletServiceContext);
        container.refresh();
        this.servletServiceContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, container);

        // create a servlet config based on the block servlet context
        ServletConfig blockServletConfig =
                new ServletConfig() {

                    public String getInitParameter(String name) {
                        return ServletFactoryBean.this.servletServiceContext.getInitParameter(name);
                    }
View Full Code Here

        Depend jspDepend = new Depend(depend);
        if (! depends.contains(jspDepend))
          depends.add(jspDepend);
      }

      ServletConfig config = null;
      Page page = _jspManager.createGeneratedPage(path, _uri, className,
                                                  config, depends);
     
      return page;
    } catch (IOException e) {
View Full Code Here

    private int maximumMessages = 100;
    private Timer clientCleanupTimer = new Timer();
    private HashMap<String,AjaxWebClient> ajaxWebClients = new HashMap<String,AjaxWebClient>();
   
    public void init() throws ServletException {
        ServletConfig servletConfig = getServletConfig();
        String name = servletConfig.getInitParameter("defaultReadTimeout");
        if (name != null) {
            defaultReadTimeout = asLong(name);
        }
        name = servletConfig.getInitParameter("maximumReadTimeout");
        if (name != null) {
            maximumReadTimeout = asLong(name);
        }
        name = servletConfig.getInitParameter("maximumMessages");
        if (name != null) {
            maximumMessages = (int)asLong(name);
        }
        clientCleanupTimer.schedule( new ClientCleaner(), 5000, 60000 );
    }
View Full Code Here

    private long requestTimeout = 1000;
   
    private HashMap<String, WebClient> clients = new HashMap<String, WebClient>();

    public void init() throws ServletException {
        ServletConfig servletConfig = getServletConfig();
        String name = servletConfig.getInitParameter("defaultReadTimeout");
        if (name != null) {
            defaultReadTimeout = asLong(name);
        }
        name = servletConfig.getInitParameter("maximumReadTimeout");
        if (name != null) {
            maximumReadTimeout = asLong(name);
        }
        name = servletConfig.getInitParameter("replyTimeout");
        if (name != null) {
          requestTimeout = asLong(name);
        }       
    }
View Full Code Here

        ori.setHttpMethod("GET");
        HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
        HttpServletResponse response = new HttpServletResponseFilter(
                                           EasyMock.createMock(HttpServletResponse.class), null);
        ServletContext context = EasyMock.createMock(ServletContext.class);
        ServletConfig config = EasyMock.createMock(ServletConfig.class);       
       
        EasyMock.replay(request);
        EasyMock.replay(context);
        EasyMock.replay(config);
       
        Message m = new MessageImpl();
        m.put(AbstractHTTPDestination.HTTP_REQUEST, request);
        m.put(AbstractHTTPDestination.HTTP_RESPONSE, response);
        m.put(AbstractHTTPDestination.HTTP_CONTEXT, context);
        m.put(AbstractHTTPDestination.HTTP_CONFIG, config);
       
        List<Object> params =
            JAXRSUtils.processParameters(ori, new MetadataMap<String, String>(), m);
        assertEquals("4 parameters expected", 4, params.size());
        assertSame(request.getClass(), params.get(0).getClass());
        assertSame(response.getClass(), params.get(1).getClass());
        assertSame(context.getClass(), params.get(2).getClass());
        assertSame(config.getClass(), params.get(3).getClass());
       
    }
View Full Code Here

  public GEDCOMCentralSiteServletTest(String testName) throws ServletException
  {
    super(testName);
        System.out.println("Running GEDCOMCentralSiteServlet... Please be patient...");
      Mockery context = new Mockery();
      final ServletConfig servletConfig = context.mock(ServletConfig.class);
      context.checking(new Expectations()
    {{
    }});
      servlet.init(servletConfig);
        context.assertIsSatisfied();
View Full Code Here

  public GedapiServletTest( String testName ) throws ServletException
    {
        super( testName );
        LOG.finest("Running GedapiServletTest... Please be patient...");
      Mockery context = new Mockery();
      final ServletConfig servletConfig = context.mock(ServletConfig.class);
      //final ServletContext servletContext = context.mock(ServletContext.class);

      //try
      //{
        context.checking(new Expectations()
View Full Code Here

  public GLinkServletTest( String testName )
    {
        super( testName );
        System.out.println("Running GLinkServletTest... Please be patient...");
      Mockery context = new Mockery();
      final ServletConfig servletConfig = context.mock(ServletConfig.class);
      //final ServletContext servletContext = context.mock(ServletContext.class);

      try
      {
        // DONE: need to setup an initial context here so that the correct DataSource object
View Full Code Here

        }

        InternalServletContext servletContext =
                getServletContext(httpContext);

        ServletConfig servletConfig;
        servletConfig = new ServletConfigImpl(alias, servletContext,
                dictionary);

        ServletRegistration servletRegistration = new ServletRegistration(
                bundle, servletContext, alias, servlet, servletConfig);
View Full Code Here

TOP

Related Classes of javax.servlet.ServletConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.