Examples of IRequestCodingStrategy


Examples of org.apache.wicket.request.IRequestCodingStrategy

  public IRequestTarget resolve(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    try
    {
      IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
        .getRequestCodingStrategy();

      final String path = requestParameters.getPath();
      IRequestTarget target = null;

      // See whether this request points to a bookmarkable page
      if (requestParameters.getBookmarkablePageClass() != null)
      {
        target = resolveBookmarkablePage(requestCycle, requestParameters);
      }
      // See whether this request points to a rendered page
      else if (requestParameters.getComponentPath() != null)
      {
        // marks whether or not we will be processing this request
        int processRequest = 0; // 0 == process, 1 == page expired, 2 == not active page
        // anymore
        synchronized (requestCycle.getSession())
        {
          // we need to check if this request has been flagged as
          // process-only-if-path-is-active and if so make sure this
          // condition is met
          if (requestParameters.isOnlyProcessIfPathActive())
          {
            // this request has indeed been flagged as
            // process-only-if-path-is-active

            Session session = Session.get();
            IPageMap pageMap = session.pageMapForName(
              requestParameters.getPageMapName(), false);
            if (pageMap == null)
            {
              // requested pagemap no longer exists - ignore this
              // request
              processRequest = 1;
            }
            else if (pageMap instanceof AccessStackPageMap)
            {
              AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
              if (accessStackPageMap.getAccessStack().size() > 0)
              {
                final Access access = accessStackPageMap.getAccessStack().peek();

                final int pageId = Integer.parseInt(Strings.firstPathComponent(
                  requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

                if (pageId != access.getId())
                {
                  // the page is no longer the active page
                  // - ignore this request
                  processRequest = 2;
                }
                else
                {
                  final int version = requestParameters.getVersionNumber();
                  if (version != Page.LATEST_VERSION &&
                    version != access.getVersion())
                  {
                    // version is no longer the active version -
                    // ignore this request
                    processRequest = 2;
                  }
                }
              }
            }
            else
            {
              // TODO also this should work..
            }
          }
        }
        if (processRequest == 0)
        {
          try
          {
            target = resolveRenderedPage(requestCycle, requestParameters);
          }
          catch (IgnoreAjaxRequestException e)
          {
            target = EmptyAjaxRequestTarget.getInstance();
          }
        }
        else
        {
          Request request = requestCycle.getRequest();
          if (request instanceof WebRequest && ((WebRequest)request).isAjax() &&
            processRequest == 2)
          {
            // if processRequest is false in an ajax request just have an empty ajax
            // target
            target = EmptyAjaxRequestTarget.getInstance();
          }
          else
          {
            throw new PageExpiredException("Request cannot be processed");
          }
        }
      }
      // See whether this request points to a shared resource
      else if (requestParameters.getResourceKey() != null)
      {
        target = resolveSharedResource(requestCycle, requestParameters);
      }
      // See whether this request points to the home page
      else if (Strings.isEmpty(path) || ("/".equals(path)))
      {
        target = resolveHomePageTarget(requestCycle, requestParameters);
      }

      // NOTE we are doing the mount check as the last item, so that it will
      // only be executed when everything else fails. This enables URLs like
      // /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
      // is either a valid mount or a non-valid mount. I (Eelco) am not
      // absolutely sure this is a great way to go, but it seems to have been
      // established as the default way of doing things. If we ever want to
      // tighten the algorithm up, it should be combined by going back to
      // unmounted paths so that requests with Wicket parameters like
      // 'bookmarkablePage' are always created and resolved in the same
      // fashion. There is a test for this in UrlMountingTest.
      if (target == null)
      {
        // still null? check for a mount
        target = requestCodingStrategy.targetForRequest(requestParameters);

        if (target == null && requestParameters.getComponentPath() != null)
        {
          // If the target is still null and there was a component path
          // then the Page could not be located in the session
          throw new PageExpiredException(
            "Cannot find the rendered page in session [pagemap=" +
              requestParameters.getPageMapName() + ",componentPath=" +
              requestParameters.getComponentPath() + ",versionNumber=" +
              requestParameters.getVersionNumber() + "]");
        }
      }
      else
      {
        // a target was found, but not by looking up a mount. check whether
        // this is allowed
        if (Application.get().getSecuritySettings().getEnforceMounts() &&
          requestCodingStrategy.pathForTarget(target) != null)
        {

          // we make an excepion if the homepage itself was mounted, see WICKET-1898
          boolean homepage = false;
          if (target instanceof BookmarkablePageRequestTarget)
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

      return requestParameters;
    }

    // get the request encoder to decode the request parameters
    IRequestCycleProcessor processor = RequestCycle.get().getProcessor();
    final IRequestCodingStrategy encoder = processor.getRequestCodingStrategy();
    if (encoder == null)
    {
      throw new WicketRuntimeException("request encoder must be not-null (provided by " +
        processor + ")");
    }

    // decode the request parameters into a strongly typed parameters
    // object that is to be used by the target resolving
    try
    {
      requestParameters = encoder.decode(this);
    }
    catch (RuntimeException re)
    {
      // do set the parameters as it was parsed.
      // else the error page will also error again (infinite loop)
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

   *      org.apache.wicket.request.RequestParameters)
   */
  public IRequestTarget resolve(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
      .getRequestCodingStrategy();

    final String path = requestParameters.getPath();
    IRequestTarget target = null;

    // See whether this request points to a bookmarkable page
    if (requestParameters.getBookmarkablePageClass() != null)
    {
      target = resolveBookmarkablePage(requestCycle, requestParameters);
    }
    // See whether this request points to a rendered page
    else if (requestParameters.getComponentPath() != null)
    {
      // marks whether or not we will be processing this request
      int processRequest = 0; // 0 == process, 1 == page expired, 2 == not active page anymore
      synchronized (requestCycle.getSession())
      {
        // we need to check if this request has been flagged as
        // process-only-if-path-is-active and if so make sure this
        // condition is met
        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
            false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
            processRequest = 1;
          }
          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                .peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = 2;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = 2;
                }
              }
            }
          }
          else
          {
            // TODO also this should work..
          }
        }
      }
      if (processRequest == 0)
      {
        try
        {
          target = resolveRenderedPage(requestCycle, requestParameters);
        }
        catch (IgnoreAjaxRequestException e)
        {
          target = EmptyAjaxRequestTarget.getInstance();
        }
      }
      else
      {
        Request request = requestCycle.getRequest();
        if (request instanceof WebRequest && ((WebRequest)request).isAjax() &&
          processRequest == 2)
        {
          // if processRequest is false in an ajax request just have an empty ajax target
          target = EmptyAjaxRequestTarget.getInstance();
        }
        else
        {
          throw new PageExpiredException("Request cannot be processed");
        }
      }
    }
    // See whether this request points to a shared resource
    else if (requestParameters.getResourceKey() != null)
    {
      target = resolveSharedResource(requestCycle, requestParameters);
    }
    // See whether this request points to the home page
    else if (Strings.isEmpty(path) || ("/".equals(path)))
    {
      target = resolveHomePageTarget(requestCycle, requestParameters);
    }

    // NOTE we are doing the mount check as the last item, so that it will
    // only be executed when everything else fails. This enables URLs like
    // /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
    // is either a valid mount or a non-valid mount. I (Eelco) am not
    // absolutely sure this is a great way to go, but it seems to have been
    // established as the default way of doing things. If we ever want to
    // tighten the algorithm up, it should be combined by going back to
    // unmounted paths so that requests with Wicket parameters like
    // 'bookmarkablePage' are always created and resolved in the same
    // fashion. There is a test for this in UrlMountingTest.
    if (target == null)
    {
      // still null? check for a mount
      target = requestCodingStrategy.targetForRequest(requestParameters);

      if (target == null && requestParameters.getComponentPath() != null)
      {
        // If the target is still null and there was a component path
        // then the Page could not be located in the session
        throw new PageExpiredException(
          "Cannot find the rendered page in session [pagemap=" +
            requestParameters.getPageMapName() + ",componentPath=" +
            requestParameters.getComponentPath() + ",versionNumber=" +
            requestParameters.getVersionNumber() + "]");
      }
    }
    else
    {
      // a target was found, but not by looking up a mount. check whether
      // this is allowed
      if (Application.get().getSecuritySettings().getEnforceMounts() &&
        requestCodingStrategy.pathForTarget(target) != null)
      {
        String msg = "Direct access not allowed for mounted targets";
        // the target was mounted, but we got here via another path
        // : deny the request
        log.error(msg + " [request=" + requestCycle.getRequest() + ",target=" + target +
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

   *      org.apache.wicket.request.RequestParameters)
   */
  public IRequestTarget resolve(final RequestCycle requestCycle,
      final RequestParameters requestParameters)
  {
    IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
        .getRequestCodingStrategy();

    final String path = requestParameters.getPath();
    IRequestTarget target = null;

    // See whether this request points to a bookmarkable page
    if (requestParameters.getBookmarkablePageClass() != null)
    {
      target = resolveBookmarkablePage(requestCycle, requestParameters);
    }
    // See whether this request points to a rendered page
    else if (requestParameters.getComponentPath() != null)
    {
      // marks whether or not we will be processing this request
      boolean processRequest = true;
      synchronized (requestCycle.getSession())
      {
        // we need to check if this request has been flagged as
        // process-only-if-path-is-active and if so make sure this
        // condition is met
        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
              false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
            processRequest = false;
          }
          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                  .peek();

              final int pageId = Integer
                  .parseInt(Strings.firstPathComponent(requestParameters
                      .getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                    version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
              }
            }
          }
          else
          {
            // TODO also this should work..
          }
        }
      }
      if (processRequest)
      {
        try
        {
          target = resolveRenderedPage(requestCycle, requestParameters);
        }
        catch (IgnoreAjaxRequestException e)
        {
          target = EmptyAjaxRequestTarget.getInstance();
        }
      }
      else
      {
        throw new PageExpiredException("Request cannot be processed");
      }
    }
    // See whether this request points to a shared resource
    else if (requestParameters.getResourceKey() != null)
    {
      target = resolveSharedResource(requestCycle, requestParameters);
    }
    // See whether this request points to the home page
    else if (Strings.isEmpty(path) || ("/".equals(path)))
    {
      target = resolveHomePageTarget(requestCycle, requestParameters);
    }

    // NOTE we are doing the mount check as the last item, so that it will
    // only be executed when everything else fails. This enables URLs like
    // /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
    // is either a valid mount or a non-valid mount. I (Eelco) am not
    // absolutely sure this is a great way to go, but it seems to have been
    // established as the default way of doing things. If we ever want to
    // tighten the algorithm up, it should be combined by going back to
    // unmounted paths so that requests with Wicket parameters like
    // 'bookmarkablePage' are always created and resolved in the same
    // fashion. There is a test for this in UrlMountingTest.
    if (target == null)
    {
      // still null? check for a mount
      target = requestCodingStrategy.targetForRequest(requestParameters);

      if (target == null && requestParameters.getComponentPath() != null)
      {
        // If the target is still null and there was a component path
        // then the Page could not be located in the session
        throw new PageExpiredException(
            "Cannot find the rendered page in session [pagemap=" +
                requestParameters.getPageMapName() + ",componentPath=" +
                requestParameters.getComponentPath() + ",versionNumber=" +
                requestParameters.getVersionNumber() + "]");
      }
    }
    else
    {
      // a target was found, but not by looking up a mount. check whether
      // this is allowed
      if (Application.get().getSecuritySettings().getEnforceMounts() &&
          requestCodingStrategy.pathForTarget(target) != null)
      {
        String msg = "Direct access not allowed for mounted targets";
        // the target was mounted, but we got here via another path
        // : deny the request
        log.error(msg + " [request=" + requestCycle.getRequest() + ",target=" + target +
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

   *      org.apache.wicket.request.RequestParameters)
   */
  public IRequestTarget resolve(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
      .getRequestCodingStrategy();

    final String path = requestParameters.getPath();
    IRequestTarget target = null;

    // See whether this request points to a bookmarkable page
    if (requestParameters.getBookmarkablePageClass() != null)
    {
      target = resolveBookmarkablePage(requestCycle, requestParameters);
    }
    // See whether this request points to a rendered page
    else if (requestParameters.getComponentPath() != null)
    {
      // marks whether or not we will be processing this request
      int processRequest = 0; // 0 == process, 1 == page expired, 2 == not active page anymore
      synchronized (requestCycle.getSession())
      {
        // we need to check if this request has been flagged as
        // process-only-if-path-is-active and if so make sure this
        // condition is met
        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
            false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
            processRequest = 1;
          }
          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = accessStackPageMap.getAccessStack().peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = 2;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = 2;
                }
              }
            }
          }
          else
          {
            // TODO also this should work..
          }
        }
      }
      if (processRequest == 0)
      {
        try
        {
          target = resolveRenderedPage(requestCycle, requestParameters);
        }
        catch (IgnoreAjaxRequestException e)
        {
          target = EmptyAjaxRequestTarget.getInstance();
        }
      }
      else
      {
        Request request = requestCycle.getRequest();
        if (request instanceof WebRequest && ((WebRequest)request).isAjax() &&
          processRequest == 2)
        {
          // if processRequest is false in an ajax request just have an empty ajax target
          target = EmptyAjaxRequestTarget.getInstance();
        }
        else
        {
          throw new PageExpiredException("Request cannot be processed");
        }
      }
    }
    // See whether this request points to a shared resource
    else if (requestParameters.getResourceKey() != null)
    {
      target = resolveSharedResource(requestCycle, requestParameters);
    }
    // See whether this request points to the home page
    else if (Strings.isEmpty(path) || ("/".equals(path)))
    {
      target = resolveHomePageTarget(requestCycle, requestParameters);
    }

    // NOTE we are doing the mount check as the last item, so that it will
    // only be executed when everything else fails. This enables URLs like
    // /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
    // is either a valid mount or a non-valid mount. I (Eelco) am not
    // absolutely sure this is a great way to go, but it seems to have been
    // established as the default way of doing things. If we ever want to
    // tighten the algorithm up, it should be combined by going back to
    // unmounted paths so that requests with Wicket parameters like
    // 'bookmarkablePage' are always created and resolved in the same
    // fashion. There is a test for this in UrlMountingTest.
    if (target == null)
    {
      // still null? check for a mount
      target = requestCodingStrategy.targetForRequest(requestParameters);

      if (target == null && requestParameters.getComponentPath() != null)
      {
        // If the target is still null and there was a component path
        // then the Page could not be located in the session
        throw new PageExpiredException(
          "Cannot find the rendered page in session [pagemap=" +
            requestParameters.getPageMapName() + ",componentPath=" +
            requestParameters.getComponentPath() + ",versionNumber=" +
            requestParameters.getVersionNumber() + "]");
      }
    }
    else
    {
      // a target was found, but not by looking up a mount. check whether
      // this is allowed
      if (Application.get().getSecuritySettings().getEnforceMounts() &&
        requestCodingStrategy.pathForTarget(target) != null)
      {

        // we make an excepion if the homepage itself was mounted, see WICKET-1898
        boolean homepage = false;
        if (target instanceof BookmarkablePageRequestTarget)
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

      params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
    }

    final IRequestTarget target = new BehaviorRequestTarget(component.getPage(), component,
        listener, params);
    final IRequestCodingStrategy requestCodingStrategy = getProcessor()
        .getRequestCodingStrategy();
    return requestCodingStrategy.encode(this, target);
  }
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

      }

      // Get the listener interface name
      target = new ListenerInterfaceRequestTarget(page, component, listener);
    }
    final IRequestCodingStrategy requestCodingStrategy = getProcessor()
        .getRequestCodingStrategy();
    return requestCodingStrategy.encode(this, target);
  }
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

      final PageParameters parameters)
  {
    final IRequestTarget target = new BookmarkablePageRequestTarget(pageMap == null
        ? PageMap.DEFAULT_NAME
        : pageMap.getName(), pageClass, parameters);
    final IRequestCodingStrategy requestCodingStrategy = getProcessor()
        .getRequestCodingStrategy();
    return requestCodingStrategy.encode(this, target);
  }
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

   *            the request target to reference
   * @return a URL that references the given request target
   */
  public final CharSequence urlFor(final IRequestTarget requestTarget)
  {
    IRequestCodingStrategy requestCodingStrategy = getProcessor().getRequestCodingStrategy();
    return requestCodingStrategy.encode(this, requestTarget);
  }
View Full Code Here

Examples of org.apache.wicket.request.IRequestCodingStrategy

   *      org.apache.wicket.request.RequestParameters)
   */
  public IRequestTarget resolve(final RequestCycle requestCycle,
    final RequestParameters requestParameters)
  {
    IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
      .getRequestCodingStrategy();

    final String path = requestParameters.getPath();
    IRequestTarget target = null;

    // See whether this request points to a bookmarkable page
    if (requestParameters.getBookmarkablePageClass() != null)
    {
      target = resolveBookmarkablePage(requestCycle, requestParameters);
    }
    // See whether this request points to a rendered page
    else if (requestParameters.getComponentPath() != null)
    {
      // marks whether or not we will be processing this request
      boolean processRequest = true;
      synchronized (requestCycle.getSession())
      {
        // we need to check if this request has been flagged as
        // process-only-if-path-is-active and if so make sure this
        // condition is met
        if (requestParameters.isOnlyProcessIfPathActive())
        {
          // this request has indeed been flagged as
          // process-only-if-path-is-active

          Session session = Session.get();
          IPageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(),
            false);
          if (pageMap == null)
          {
            // requested pagemap no longer exists - ignore this
            // request
            processRequest = false;
          }
          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                .peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
              }
            }
          }
          else
          {
            // TODO also this should work..
          }
        }
      }
      if (processRequest)
      {
        try
        {
          target = resolveRenderedPage(requestCycle, requestParameters);
        }
        catch (IgnoreAjaxRequestException e)
        {
          target = EmptyAjaxRequestTarget.getInstance();
        }
      }
      else
      {
        Request request = requestCycle.getRequest();
        if (request instanceof WebRequest && ((WebRequest)request).isAjax())
        {
          // if processRequest is false in an ajax request just have an empty ajax target
          target = EmptyAjaxRequestTarget.getInstance();
        }
        else
        {
          throw new PageExpiredException("Request cannot be processed");
        }
      }
    }
    // See whether this request points to a shared resource
    else if (requestParameters.getResourceKey() != null)
    {
      target = resolveSharedResource(requestCycle, requestParameters);
    }
    // See whether this request points to the home page
    else if (Strings.isEmpty(path) || ("/".equals(path)))
    {
      target = resolveHomePageTarget(requestCycle, requestParameters);
    }

    // NOTE we are doing the mount check as the last item, so that it will
    // only be executed when everything else fails. This enables URLs like
    // /foo/bar/?wicket:bookmarkablePage=my.Page to be resolved, where
    // is either a valid mount or a non-valid mount. I (Eelco) am not
    // absolutely sure this is a great way to go, but it seems to have been
    // established as the default way of doing things. If we ever want to
    // tighten the algorithm up, it should be combined by going back to
    // unmounted paths so that requests with Wicket parameters like
    // 'bookmarkablePage' are always created and resolved in the same
    // fashion. There is a test for this in UrlMountingTest.
    if (target == null)
    {
      // still null? check for a mount
      target = requestCodingStrategy.targetForRequest(requestParameters);

      if (target == null && requestParameters.getComponentPath() != null)
      {
        // If the target is still null and there was a component path
        // then the Page could not be located in the session
        throw new PageExpiredException(
          "Cannot find the rendered page in session [pagemap=" +
            requestParameters.getPageMapName() + ",componentPath=" +
            requestParameters.getComponentPath() + ",versionNumber=" +
            requestParameters.getVersionNumber() + "]");
      }
    }
    else
    {
      // a target was found, but not by looking up a mount. check whether
      // this is allowed
      if (Application.get().getSecuritySettings().getEnforceMounts() &&
        requestCodingStrategy.pathForTarget(target) != null)
      {
        String msg = "Direct access not allowed for mounted targets";
        // the target was mounted, but we got here via another path
        // : deny the request
        log.error(msg + " [request=" + requestCycle.getRequest() + ",target=" + target +
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.