Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5 RC2
    • Fix Version/s: 1.5 RC3
    • Component/s: None
    • Labels:
      None

      Description

      Hi, since the setRedirect logic was moved to the Page control...
      we must validate to guarantee that the "contextPath" will not be appended to the url twice.

      if you call setRedirect() two times (i know it´s strange but it´s possible), it will duplicate the contextPath...

      This is how I fixed this for my app:

      /**

      • @see net.sf.click.Page#setRedirect(java.lang.String)
        */
        public void setRedirect(String location) {
        if (location != null) {
        if (location.charAt(0) == '/')
        Unknown macro: { Context context = getContext(); String contextPath = context.getRequest().getContextPath(); if(!location.startsWith(contextPath)){ location = contextPath + location; } }

        }
        redirect = location;
        }

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Bob Schellink
            Reporter:
            Ricardo R. Lecheta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development