Examples of ServletRequest


Examples of javax.servlet.ServletRequest

    }

    int colon = url.indexOf(':');
    int slash = url.indexOf('/');
    if (slash == 0 || colon < 0 || slash < 0 || slash < colon) {
      ServletRequest request = pageContext.getRequest();

      try {
        RequestDispatcher disp = request.getRequestDispatcher(url);

        if (disp == null)
          throw new JspException(L.l("URL `{0}' does not map to any servlet",
                                     url));
View Full Code Here

Examples of javax.servlet.ServletRequest

    try {
      log.fine(this + " cron");

      FilterChain chain = createServletChain();

      ServletRequest req = new StubServletRequest();
      ServletResponse res = new StubServletResponse();

      chain.doFilter(req, res);
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
View Full Code Here

Examples of javax.servlet.ServletRequest

      throw new UnsupportedOperationException(getClass().getName());
  }

  private CauchoRequest getCauchoRequest()
  {
    ServletRequest request = _request;
   
    while (request instanceof ServletRequestWrapper) {
      if (request instanceof CauchoRequest)
        return (CauchoRequest) request;
View Full Code Here

Examples of javax.servlet.ServletRequest

  public int getRequestDepth(int depth)
  {
    if (depth > MAX_DEPTH)
      throw new RuntimeException(L.l("too many request dispatchers"));

    ServletRequest req = getRequest();
    while (req != null) {
      if (req instanceof CauchoRequest)
        return ((CauchoRequest) req).getRequestDepth(depth + 1);
      else if (req instanceof ServletRequestWrapper) {
        ServletRequestWrapper reqWrap = (ServletRequestWrapper) req;
View Full Code Here

Examples of javax.servlet.ServletRequest

  {
    HttpServletRequest parentReq;
    ServletRequestWrapper reqWrapper = null;

    if (topRequest instanceof ServletRequestWrapper) {
      ServletRequest request = topRequest;

      while (request instanceof ServletRequestWrapper) {
        reqWrapper = (ServletRequestWrapper) request;

        request = ((ServletRequestWrapper) request).getRequest();
View Full Code Here

Examples of javax.servlet.ServletRequest

    }

    @Override
    public Object getAttribute(String name)
    {
      ServletRequest request = _request;
     
      if (request != null) {
        synchronized (request) {
          return request.getAttribute("caucho.comet." + name);
        }
      }
     
      return null;
    }
View Full Code Here

Examples of javax.servlet.ServletRequest

    }

    @Override
    public void removeAttribute(String name)
    {
      ServletRequest request = _request;
     
      if (request != null) {
        synchronized (request) {
          request.removeAttribute("caucho.comet." + name);
        }
      }
    }
View Full Code Here

Examples of javax.servlet.ServletRequest

  public void doFilter(ServletRequest request,
                       ServletResponse response)
    throws ServletException, IOException
  {
    // HashMap<String,String> oldMap = null;
    ServletRequest ptr = request;
   
    while (ptr instanceof ServletRequestWrapper) {
      ServletRequestWrapper wrapper;
      wrapper = (ServletRequestWrapper) ptr;
View Full Code Here

Examples of javax.servlet.ServletRequest

        expect(wContext.getBean(ScriptManager.class)).andReturn(scriptManager).anyTimes();
        replay(wContext);
        ServletContext servletContext = createNiceMock(ServletContext.class);
        expect(servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(wContext).anyTimes();
        replay(servletContext);
        ServletRequest request = new MockHttpServletRequest();
        request.setAttribute("_RENDER_CONTEXT", context);
        pageContext = createNiceMock(PageContext.class);
        expect(pageContext.getServletContext()).andReturn(servletContext).anyTimes();
        expect(pageContext.getRequest()).andReturn(request).anyTimes();
        tag = new RegionWidgetTag();
        tag.setPageContext(pageContext);
View Full Code Here

Examples of javax.servlet.ServletRequest

    }

    private SlingBindings getBindings(Object adaptable) {
        if (adaptable instanceof ServletRequest) {
            ServletRequest request = (ServletRequest) adaptable;
            return (SlingBindings) request.getAttribute(SlingBindings.class.getName());
        } else {
            return null;
        }
    }
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.