Package org.emrys.webosgi.launcher.internal.adapter

Examples of org.emrys.webosgi.launcher.internal.adapter.ServletContextAdapter


      return new Path(Platform.getInstallLocation().getURL().getFile())
          .toPortableString();
    }
    // Case get Framework's Servlet Context path.
    if (name.equals(ATTR_FWK_SERVLET_CTX_PATH)) {
      ServletContextAdapter globalServletCtx = FwkExternalAgent
          .getInstance().getFwkServletContext(SERVLET_TYPE_HTTP);
      if (globalServletCtx != null)
        return globalServletCtx.getContextPath();
    }

    // Search from buffered properties.
    Object value = frameworkProperties.get(name);
    if (value != null)
View Full Code Here


    super.init(config);

    fwkAgent = FwkExternalAgent.getInstance();

    // Check if the fwk has been launched by another launcher to skip.
    ServletContextAdapter fwkServletCtxAdapter = fwkAgent
        .getFwkServletContext(FwkExternalAgent.SERVLET_TYPE_HTTP);
    if (fwkServletCtxAdapter != null) {
      isFwkLaunchedByOther = true;
      return;
    }

    this.config = config;
    ServletContext fwkServletCtx = config.getServletContext();
    ServletContextAdapter servletCtxAdapter = new ServletContextAdapter(
        fwkServletCtx);
    fwkAgent.setFwkServletContext(FwkExternalAgent.SERVLET_TYPE_HTTP,
        servletCtxAdapter);

    try {
View Full Code Here

      String ctxPathConfigured = fwkAgent
          .getOSGiSysConfigProperty("webosgi.contextPath");
      if (host != null && host.trim().length() > 0) {
        // Check if servletContext.getContextPath() is available if
        // Servlet 2.5. It true, override the configured context path.
        ServletContextAdapter fwkServletCtxAdapter = fwkAgent
            .getFwkServletContext(FwkExternalAgent.SERVLET_TYPE_HTTP);
        String ctxPathFromServlet = fwkServletCtxAdapter
            .getContextPath();
        final String ctxPath = ctxPathFromServlet != null ? ctxPathFromServlet
            : (ctxPathConfigured != null ? ctxPathConfigured.trim()
                : "");
        new Thread(new Runnable() {
View Full Code Here

    super.init(config);
    // For servlets in the default (root) context, this method returns ""
    // Adjust ServletContext Path. Super class has done the job when the
    // first request arrives in service() method. The following code can be
    // deleted.
    ServletContextAdapter fwkServletCtx = fwkAgent
        .getFwkServletContext(FwkExternalAgent.SERVLET_TYPE_HTTP);
    String originalCtxPath = fwkServletCtx.getContextPath();
    if (originalCtxPath != null && originalCtxPath.length() > 0) {
      fwkServletCtx.setContextPath(originalCtxPath
          + BRIDGE_SERVLET_MAP_PATH);
    } else
      fwkServletCtx.setContextPath(BRIDGE_SERVLET_MAP_PATH);
  }
View Full Code Here

TOP

Related Classes of org.emrys.webosgi.launcher.internal.adapter.ServletContextAdapter

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.