Examples of Webapp


Examples of com.adaptrex.tools.webapp.Webapp

  @Override
  public Webapp loadWebapp(String fullPath) throws IOException {
    Environment env = environmentService.getEnvironment();

    Webapp webapp = new Webapp();
    webapp.setFullPath(fullPath);
   
    /*
     * Create collections to hold our settings, frameworks and webapps for later processing
     */
    Ini ini = new Ini();
    File appSettings = new File(fullPath + "/src/main/webapp/adaptrex/app.config");
    if (!appSettings.exists()) return null;
    ini.load(new FileReader(appSettings));
   
    /*
     * Get our app name
     */
    Ini.Section settingsSection = ini.get(SETTINGS);
    webapp.setName(settingsSection.get("name"));
    webapp.setBasePackage(settingsSection.get(BASE_PACKAGE));
    webapp.setGlobalFolder(settingsSection.get(GLOBAL_FOLDER));
    webapp.setGlobalNamespace(settingsSection.get(GLOBAL_NAMESPACE));
   
   
    /*
     * Get information about our webapp's frameworks
     */
    Ini.Section frameworkSection = ini.get(FRAMEWORKS);
    if (frameworkSection.containsKey(ADAPTREXJS))
      webapp.setAdaptrex(env.getAdaptrexFrameworks().get(frameworkSection.get(ADAPTREXJS)));
    if (frameworkSection.containsKey(EXTJS))
      webapp.setExt(env.getExtFrameworks().get(frameworkSection.get(EXTJS)));
    if (frameworkSection.containsKey(SENCHA_TOUCH))
      webapp.setSenchaTouch(env.getSenchaTouchFrameworks().get(frameworkSection.get(SENCHA_TOUCH)));
    if (frameworkSection.containsKey(ORM))
      webapp.setOrm(frameworkSection.get(ORM));
    if (frameworkSection.containsKey(PRESENTATION))
      webapp.setPresentation(frameworkSection.get(PRESENTATION));
    if (frameworkSection.containsKey(DI))
      webapp.setDi(frameworkSection.get(DI));
     
   
    /*
     * Get our list of pages
     */
    Map<String,String> pagesSection = ini.get(PAGES);
    Map<String,Page> pages = webapp.getPages();
    if (pagesSection != null) {
      for (String key : pagesSection.keySet()) {
        String[] valueParts = pagesSection.get(key).split(",");
        String path = key.replace(".", "/");
        String name = valueParts[0];
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

  /**
   * Adds a load-balance
   */
  public LoadBalanceRule createLoadBalance()
  {
    WebApp webApp = getRewriteDispatch().getWebApp();

    if (webApp == null)
      throw new ConfigException(L.l("<load-balance> requires a web-app.  Host-based <rewrite-dispatch> can not use <load-balance>."));

    return new LoadBalanceRule(getRewriteDispatch(), webApp);
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

  /**
   * Adds a proxy
   */
  public ProxyRule createProxy()
  {
    WebApp webApp = getRewriteDispatch().getWebApp();

    if (webApp == null)
      throw new ConfigException(L.l("<proxy> requires a web-app.  Host-based <rewrite-dispatch> can not use <proxy>."));

    return new ProxyRule(getRewriteDispatch(), webApp);
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

  @PostConstruct
  public void init()
    throws ConfigException
  {
    try {
      WebApp webApp = WebApp.getCurrent();

      _proxyServlet.init(webApp);

      if (webApp != null)
        webApp.addServlet(_servlet);
    }
    catch (ServletException ex) {
      throw ConfigException.create(ex);
    }
  }
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

        if (isLoggable)
          log.fine(dbgId() + "web-app '" + appEntry.getContextPath() + "'");

        crc64 = Crc64.generate(crc64, appEntry.getContextPath());

        WebApp app = appEntry.getWebApp();

        if (appEntry.isDynamicDeploy()) {
          writeString(os, HMUX_MATCH, "/*");

          crc64 = Crc64.generate(crc64, "/*");

          if (isLoggable)
            log.fine(dbgId() + "dynamic '" + appEntry.getContextPath() + "'");
        }
        else if (app == null || ! app.isActive()) {
          if (isLoggable)
            log.fine(dbgId() + "not active '" + appEntry.getContextPath() + "'");

          writeString(os, HMUX_WEB_APP_UNAVAILABLE, "");
        }
        else {
          if (isLoggable)
            log.fine(dbgId() + "active '" + appEntry.getContextPath() + "'");
          ArrayList<String> patternList = app.getServletMappingPatterns();

          for (int j = 0; patternList != null && j < patternList.size(); j++) {
            String pattern = patternList.get(j);

            writeString(os, HMUX_MATCH, pattern);

            crc64 = Crc64.generate(crc64, pattern);
          }

          patternList = app.getServletIgnoreMappingPatterns();

          for (int j = 0; patternList != null && j < patternList.size(); j++) {
            String pattern = patternList.get(j);

            writeString(os, HMUX_IGNORE, pattern);
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

  private Filter _filter;

  public RewriteFilterAdapter(Filter filter)
    throws ServletException
  {
    WebApp webApp = WebApp.getCurrent();
    FilterConfigImpl filterConfig = new FilterConfigImpl();
    filterConfig.setServletContext(webApp);

    filter.init(filterConfig);
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

    throws ConfigException
  {
    try {
      _proxyServlet.init();

      WebApp webApp = WebApp.getCurrent();

      if (webApp != null)
        webApp.addServlet(_servlet);
    }
    catch (ServletException ex) {
      throw ConfigException.create(ex);
    }
  }
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

      return AuthorizationResult.DEFAULT_ALLOW;
   
    if (request.isSecure())
      return AuthorizationResult.DEFAULT_ALLOW;

    WebApp webApp = (WebApp) application;
    Host host = webApp.getHost();
    String secureHost = host.getSecureHostName();

    if (secureHost != null) {
      String url = ("https://" + secureHost + webApp.getContextPath()
                    + request.getServletPath());

      if (request.getPathInfo() != null)
        url += request.getPathInfo();
      if (request.getQueryString() != null)
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

  {
    String contextPath = "";

    SessionManager manager = _manager;
    if (manager != null) {
      WebApp webApp = manager.getWebApp();

      if (webApp != null)
        contextPath = "," + webApp.getContextPath();
    }

    return getClass().getSimpleName() + "[" + getId() + contextPath + "]";
  }
View Full Code Here

Examples of com.caucho.server.webapp.WebApp

 
  private ArrayList<String> _welcomeFileList = new ArrayList<String>();
 
  public WelcomeFile()
  {
    WebApp webApp = WebApp.getCurrent();
   
    if (webApp == null)
      throw new IllegalStateException(L.l("{0} must have an active {1}.",
                                          WelcomeFile.class.getSimpleName(),
                                          WebApp.class.getSimpleName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.