Package com.caucho.server.webapp

Examples of com.caucho.server.webapp.WebApp


  Templates get(String href, CauchoRequest req)
    throws Exception
  {
    String servletPath = req.getPageServletPath();

    WebApp webApp = req.getWebApp();

    Path appDir = webApp.getRootDirectory();
    Path pwd = appDir.lookupNative(webApp.getRealPath(servletPath));
    pwd = pwd.getParent();
   
    String fullStyleSheet = pwd.toString() + "/" + href;

    Templates stylesheet = null;
View Full Code Here


  Templates getStylesheet(CauchoRequest req, String href)
    throws Exception
  {
    String servletPath = req.getPageServletPath();

    WebApp webApp = req.getWebApp();
    Path appDir = webApp.getRootDirectory();
    Path pwd = appDir.lookupNative(webApp.getRealPath(servletPath));
    pwd = pwd.getParent();

    DynamicClassLoader loader;
    loader = (DynamicClassLoader) webApp.getClassLoader();
   
    MergePath stylePath = new MergePath();
    stylePath.addMergePath(pwd);
    stylePath.addMergePath(appDir);
View Full Code Here

    HttpSession session = null;

    if (needsSession)
      session = ((HttpServletRequest) request).getSession(true);

    WebApp app = (WebApp) request.getServletContext();

    _webApp = app;

    initialize(servlet, app, request, response,
               errorPage, session, bufferSize, autoFlush,
View Full Code Here

  {
    if (_elContext != null)
      return _elContext;

    if (_elContextValue == null) {
      WebApp webApp = getApplication();

      JspApplicationContextImpl jspContext = webApp.getJspApplicationContext();

      if (_elResolver == null) {
        ELResolver[] resolverArray = jspContext.getELResolverArray();
        _elResolver = new PageContextELResolver(this, resolverArray);
      }
View Full Code Here

                                                      queryString,
                                                      chain);

      if (rewriteChain != chain) {
        Server server = getServer();
        WebApp webApp = server.getDefaultWebApp();
        invocation.setWebApp(webApp);

        if (webApp != null) {
          rewriteChain = new WebAppFilterChain(rewriteChain, webApp);

          if (webApp.getAccessLog() != null)
            rewriteChain = new AccessLogFilterChain(rewriteChain, webApp);
        }

        invocation.setFilterChain(rewriteChain);
        isAlwaysModified = false;
View Full Code Here

    return _factory.createValueExpression(instance, expectedType);
  }

  public String toString()
  {
    WebApp webApp = null;
    if (_jspApplicationContext != null)
      webApp = _jspApplicationContext.getWebApp();

    return "JspExpressionFactoryImpl["
      + webApp
View Full Code Here

  {
    super.init(conf);

    JspManager manager = new JspManager();

    WebApp webApp = (WebApp) getServletContext();

    manager.setXml(_isXml);
    manager.setLoadTldOnInit(_loadTldOnInit
                             || webApp.createJsp().isLoadTldOnInit());
    manager.setPageCacheMax(_pageCacheMax);

    manager.initWebApp(webApp);
     
    setManager(manager);
View Full Code Here

        throw new ConfigException(ex);
      }

      // add path-mappings to map local files with absolute paths

      WebApp app = WebApp.getLocal();

      CharBuffer cb = CharBuffer.allocate();

      for (Iterator<Api> i = _api.values().iterator(); i.hasNext(); ) {
        Api api = i.next();

        if (api.isLocalAbsolute()) {
          cb.clear();
          cb.append("/");
          cb.append(api.getId());
          cb.append("/*");
          String urlPattern = cb.toString();

          PathMapping pm = new PathMapping();
          pm.setUrlPattern(urlPattern);
          pm.setRealPath(api.getLocation());
          try {
            app.addPathMapping(pm);
          } catch (Exception ex) {
            throw new ConfigException(ex);
          }
        }
      }
View Full Code Here

    // default to true if ends with x
    if (_uri.endsWith("x"))
      _parseState.setXml(true);

    WebApp app = _jspCompiler.getWebApp();
    Path appDir = _jspCompiler.getAppDir();
    if (appDir == null && app != null)
      appDir = app.getRootDirectory();

    if (app != null && app.hasPre23Config()
        && _parseState.getELIgnoredDefault() == null
        && ! _parseState.isXml()) { // jsp/100a
      _parseState.setELIgnoredDefault(true);
    }

    JspConfig jspConfig = null;

    if (jspConfig == null && app != null)
      jspConfig = (JspConfig) app.getExtension("jsp-config");

    ArrayList<JspPropertyGroup> jspList = new ArrayList<JspPropertyGroup>();
    _jspPropertyGroup = null;

    if (_jspPropertyGroup == null) {
      _jspPropertyGroup = _jspCompiler.getJspPropertyGroup();

      if (_jspPropertyGroup != null) {
        jspList.add(_jspPropertyGroup);
      }
    }

    if (_jspPropertyGroup == null && app != null) {
      _jspPropertyGroup = app.getJsp();
     
      if (_jspPropertyGroup != null)
        jspList.add(_jspPropertyGroup);
    }

    if (_jspPropertyGroup == null) {
      _jspPropertyGroup = _jspCompiler.getJspPropertyGroup();
     
      if (_jspPropertyGroup != null)
        jspList.add(_jspPropertyGroup);
    }

    if (jspConfig != null) {
      jspList.addAll(jspConfig.findJspPropertyGroupList(_uri));

      if (_parseState.getELIgnoredDefault() == null)
        _parseState.setELIgnoredDefault(false);
    }

    JspResourceManager resourceManager = _jspCompiler.getResourceManager();
    if (resourceManager != null) {
    }
    else if (app != null)
      resourceManager = new AppResourceManager(app);
    else {
      resourceManager = new AppDirResourceManager(appDir);
    }

    TagFileManager tagFileManager = _jspCompiler.getTagFileManager();

    TaglibManager taglibManager = _jspCompiler.getTaglibManager();

    JspPageConfig pageConfig = new JspPageConfig();

    for (JspPropertyGroup jspPropertyGroup : jspList) {
      ArrayList<String> preludeList = jspPropertyGroup.getIncludePreludeList();
      for (int i = 0; preludeList != null && i < preludeList.size(); i++) {
        String prelude = preludeList.get(i);
        _preludeList.add(prelude);
      }

      ArrayList<String> codaList = jspPropertyGroup.getIncludeCodaList();
      for (int i = 0; codaList != null && i < codaList.size(); i++) {
        String coda = codaList.get(i);
        _codaList.add(coda);
      }

      _parseState.setJspPropertyGroup(jspPropertyGroup);
      _parseState.setSession(jspPropertyGroup.isSession());
      _parseState.setScriptingInvalid(jspPropertyGroup.isScriptingInvalid());

      if (jspPropertyGroup.isELIgnored() != null) {
        _parseState.setELIgnored(Boolean.TRUE.equals(jspPropertyGroup.isELIgnored()));
      }
     
      _parseState.setVelocityEnabled(jspPropertyGroup.isVelocityEnabled());
      _parseState.setPageEncoding(jspPropertyGroup.getPageEncoding());
     
      if (Boolean.TRUE.equals(jspPropertyGroup.isXml()))
        _parseState.setXml(true);
     
      if (Boolean.FALSE.equals(jspPropertyGroup.isXml())) {
        _parseState.setXml(false);
        _parseState.setForbidXml(true);
      }

      if (jspPropertyGroup.getPageEncoding() != null) {
        try {
          _parseState.setPageEncoding(jspPropertyGroup.getPageEncoding());
        } catch (JspParseException e) {
        }
      }

      pageConfig.setStaticEncoding(jspPropertyGroup.isStaticEncoding());

      _parseState.setRecycleTags(jspPropertyGroup.isRecycleTags());
     
      _parseState.setTrimWhitespace(jspPropertyGroup.isTrimDirectiveWhitespaces());
      _parseState.setDeferredSyntaxAllowedAsLiteral(jspPropertyGroup.isDeferredSyntaxAllowedAsLiteral());

      if (jspPropertyGroup.getTldFileSet() != null)
        taglibManager.setTldFileSet(jspPropertyGroup.getTldFileSet());
    }

    if (_jsfPropertyGroup == null)
      _jsfPropertyGroup = _jspCompiler.getJsfPropertyGroup();

    if (_jsfPropertyGroup == null && app != null)
       _jsfPropertyGroup = app.getJsf();

    _parseState.setResourceManager(resourceManager);
    LineMap lineMap = null;

    _tagManager = new ParseTagManager(resourceManager,
View Full Code Here

        xml.setNamespaceAware(true);
        xml.setDtdValidating(true);
        xml.parse(_jspPath);
      }
      else {
        WebApp app = _jspCompiler.getWebApp();

        // jsp/0135
        if (app != null && app.hasPre23Config()) {
          if (_parseState.getELIgnoredDefault() == null)
            _parseState.setELIgnoredDefault(true);
        }

        _parser.parse(_jspPath, _uri);
View Full Code Here

TOP

Related Classes of com.caucho.server.webapp.WebApp

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.