Package javax.servlet

Examples of javax.servlet.ServletRequest


     * @throws IOException if an I/O exception ocours
     * @throws ServletException if a servlet exception ocours
     */
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
        throws IOException, ServletException {
        ServletRequest sessionBindingRequest = new HttpServletRequestWrapper((HttpServletRequest) servletRequest);
        HttpServletResponse response = (HttpServletResponse) servletResponse;
        ResponseFactory.addNoCacheHeaderDirective(response);
        filterChain.doFilter(sessionBindingRequest, servletResponse);
    }
View Full Code Here


    return scope;
  }
 
  private boolean isSessionScope()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request != null) {
      HttpSession session = ((HttpServletRequest) request).getSession();

      return session != null;
View Full Code Here

    return false;
  }
 
  private Scope getSessionScope()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request == null)
      return null;
   
    HttpSession session = ((HttpServletRequest) request).getSession();
View Full Code Here

    return scope;
  }
 
  private Scope createSessionScope()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request == null)
      return null;
   
    HttpSession session = ((HttpServletRequest) request).getSession();

    if (session == null)
      return null;
   
    Scope scope = (Scope) session.getAttribute(SESSION_CONVERSATION);
   
    if (scope == null) {
      scope = new Scope();
      session.setAttribute(SESSION_CONVERSATION, scope);
    }
   
    request.setAttribute(REQUEST_CONVERSATION, new RequestListener(scope));
   
    return scope;
  }
View Full Code Here

   * Returns true if the scope is currently active.
   */
  @Override
  public boolean isActive()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request != null) {
      HttpSession session = ((HttpServletRequest) request).getSession();

      return session != null;
View Full Code Here

  }

  @Override
  protected ContextContainer getContextContainer()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request == null)
      return null;

    HttpSession session = ((HttpServletRequest) request).getSession();
View Full Code Here

  }

  @Override
  protected ContextContainer createContextContainer()
  {
    ServletRequest request = ServletInvocation.getContextRequest();

    if (request == null)
      return null;

    HttpSession session = ((HttpServletRequest) request).getSession();
View Full Code Here

        String charEncoding = getCharEncoding();

        if (charEncoding != null)
          response.getResponseStream().setEncoding(charEncoding);

        final ServletRequest request = pageContext.getRequest();

        disp.include(request, response);

        final Integer statusCode
          = (Integer) request.getAttribute("com.caucho.dispatch.response.statusCode");

        //jsp/1jif
        if (statusCode != null) {
          final int status = statusCode.intValue();

          if (status < 200 || status > 299) {
            String message = L.l(
              "c:import status code {0} received while serving {1}",
              statusCode,
              context + url);

            throw new JspException(message);
          }
        }

        /*
        int status = response.getStatus();

        if (status < 200 || status > 299) {
          String message = L.l(
            "c:import status code {0} received while serving {1}",
            status,
            context + url);

          throw new JspException(message);
        }
        */
      }
      else
        handleExternalBody(context + url);
     
      return;
    }

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

      String charEncoding = getCharEncoding();

      if (charEncoding != null)
        response.getResponseStream().setEncoding(charEncoding);

      RequestDispatcher disp = request.getRequestDispatcher(url);

      JstlImportResponseWrapper wrapper = new JstlImportResponseWrapper(response);
      disp.include(request, wrapper);

      //jsp/1jie
View Full Code Here

    }

    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

    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

TOP

Related Classes of javax.servlet.ServletRequest

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.