Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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;
        }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: