Examples of PageContext


Examples of javax.servlet.jsp.PageContext

    Servlet servlet = JspSupportServlet.jspSupportServlet;

    velocityManager.init(servletContext);

    boolean usedJspFactory = false;
    PageContext pageContext = (PageContext) ActionContext.getContext().get(
        ServletActionContext.PAGE_CONTEXT);

    if (pageContext == null && servlet != null)
    {
      jspFactory = JspFactory.getDefaultFactory();
View Full Code Here

Examples of javax.servlet.jsp.PageContext

              String errorPageURL,
                                      boolean needsSession, int bufferSize,
                                      boolean autoflush)
    {
        try {
      PageContext pc;
      if( usePool ) {
    pc=(PageContextImpl)pool.get();
    if( pc == null ) pc= new PageContextImpl(this);
      } else {
    pc =  new PageContextImpl(this);
      }

      //      System.out.println("JspFactoryImpl.getPC"  + pc);
      pc.initialize(servlet, request, response, errorPageURL,
                          needsSession, bufferSize, autoflush);
     
            return pc;
        } catch (Throwable ex) {
            /* FIXME: need to do something reasonable here!! */
 
View Full Code Here

Examples of javax.servlet.jsp.PageContext

    private PageContext internalGetPageContext(Servlet servlet, ServletRequest request,
            ServletResponse response, String errorPageURL, boolean needsSession,
            int bufferSize, boolean autoflush) {
        try {
            PageContext pc;
            if (USE_POOL) {
                PageContextPool pool = localPool.get();
                if (pool == null) {
                    pool = new PageContextPool();
                    localPool.set(pool);
                }
                pc = pool.get();
                if (pc == null) {
                    pc = new PageContextImpl();
                }
            } else {
                pc = new PageContextImpl();
            }
            pc.initialize(servlet, request, response, errorPageURL,
                    needsSession, bufferSize, autoflush);
            return pc;
        } catch (Throwable ex) {
            /* FIXME: need to do something reasonable here!! */
            log.fatal("Exception initializing page context", ex);
View Full Code Here

Examples of javax.servlet.jsp.PageContext

                pool[current] = o;
            }
        }

        public PageContext get() {
            PageContext item = null;
            if (current >= 0) {
                item = pool[current];
                current--;
            }
            return item;
View Full Code Here

Examples of javax.servlet.jsp.PageContext

    if (base == null) {
      context.setPropertyResolved(true);
      if (property != null) {
        String key = property.toString();
        PageContext page = (PageContext) context
            .getContext(JspContext.class);
        return page.findAttribute(key);
      }
    }

    return null;
  }
View Full Code Here

Examples of javax.servlet.jsp.PageContext

    if (base == null) {
      context.setPropertyResolved(true);
      if (property != null) {
        String key = property.toString();
        PageContext page = (PageContext) context
            .getContext(JspContext.class);
        int scope = page.getAttributesScope(key);
        if (scope != 0) {
          page.setAttribute(key, value, scope);
        } else {
          page.setAttribute(key, value);
        }
      }
    }
  }
View Full Code Here

Examples of javax.servlet.jsp.PageContext

    return false;
  }

  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {

    PageContext ctxt = (PageContext) context.getContext(JspContext.class);
    List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
    Enumeration e;
    Object value;
    String name;

    e = ctxt.getAttributeNamesInScope(PageContext.PAGE_SCOPE);
    while (e.hasMoreElements()) {
      name = (String) e.nextElement();
      value = ctxt.getAttribute(name, PageContext.PAGE_SCOPE);
      FeatureDescriptor descriptor = new FeatureDescriptor();
      descriptor.setName(name);
      descriptor.setDisplayName(name);
      descriptor.setExpert(false);
      descriptor.setHidden(false);
      descriptor.setPreferred(true);
      descriptor.setShortDescription("page scoped attribute");
      descriptor.setValue("type", value.getClass());
      descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
      list.add(descriptor);
    }

    e = ctxt.getAttributeNamesInScope(PageContext.REQUEST_SCOPE);
    while (e.hasMoreElements()) {
      name = (String) e.nextElement();
      value = ctxt.getAttribute(name, PageContext.REQUEST_SCOPE);
      FeatureDescriptor descriptor = new FeatureDescriptor();
      descriptor.setName(name);
      descriptor.setDisplayName(name);
      descriptor.setExpert(false);
      descriptor.setHidden(false);
      descriptor.setPreferred(true);
      descriptor.setShortDescription("request scope attribute");
      descriptor.setValue("type", value.getClass());
      descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
      list.add(descriptor);
    }

    if (ctxt.getSession() != null) {
      e = ctxt.getAttributeNamesInScope(PageContext.SESSION_SCOPE);
      while (e.hasMoreElements()) {
        name = (String) e.nextElement();
        value = ctxt.getAttribute(name, PageContext.SESSION_SCOPE);
        FeatureDescriptor descriptor = new FeatureDescriptor();
        descriptor.setName(name);
        descriptor.setDisplayName(name);
        descriptor.setExpert(false);
        descriptor.setHidden(false);
        descriptor.setPreferred(true);
        descriptor.setShortDescription("session scoped attribute");
        descriptor.setValue("type", value.getClass());
        descriptor.setValue("resolvableAtDesignTime", Boolean.FALSE);
        list.add(descriptor);
      }
    }

    e = ctxt.getAttributeNamesInScope(PageContext.APPLICATION_SCOPE);
    while (e.hasMoreElements()) {
      name = (String) e.nextElement();
      value = ctxt.getAttribute(name, PageContext.APPLICATION_SCOPE);
      FeatureDescriptor descriptor = new FeatureDescriptor();
      descriptor.setName(name);
      descriptor.setDisplayName(name);
      descriptor.setExpert(false);
      descriptor.setHidden(false);
View Full Code Here

Examples of javax.servlet.jsp.PageContext

    private PageContext internalGetPageContext(Servlet servlet, ServletRequest request,
            ServletResponse response, String errorPageURL, boolean needsSession,
            int bufferSize, boolean autoflush) {
        try {
            PageContext pc;
            if (USE_POOL) {
                PageContextPool pool = localPool.get();
                if (pool == null) {
                    pool = new PageContextPool();
                    localPool.set(pool);
                }
                pc = pool.get();
                if (pc == null) {
                    pc = new PageContextImpl();
                }
            } else {
                pc = new PageContextImpl();
            }
            pc.initialize(servlet, request, response, errorPageURL,
                    needsSession, bufferSize, autoflush);
            return pc;
        } catch (Throwable ex) {
            /* FIXME: need to do something reasonable here!! */
            log.fatal("Exception initializing page context", ex);
View Full Code Here

Examples of javax.servlet.jsp.PageContext

                pool[current] = o;
            }
        }

        public PageContext get() {
            PageContext item = null;
            if (current >= 0) {
                item = pool[current];
                current--;
            }
            return item;
View Full Code Here

Examples of javax.servlet.jsp.PageContext

                                      String errorPageURL,
                                      boolean needsSession, int bufferSize,
                                      boolean autoflush)
    {
        try {
            PageContext pc;
            if( usePool ) {
                pc=(PageContextImpl)pool.get();
                if( pc == null ) {
                    pc= new PageContextImpl(this);
                }
            } else {
                pc =  new PageContextImpl(this);
            }
            pc.initialize(servlet, request, response, errorPageURL,
                          needsSession, bufferSize, autoflush);
            return pc;
        } catch (Throwable ex) {
            /* FIXME: need to do something reasonable here!! */
            loghelper.log("Exception initializing page context", ex);
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.