Click
  1. Click
  2. CLK-338

sendRedirect does not convert jsp extension to htm

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5 M1, 1.4.1
    • Component/s: None
    • Labels:
      None

      Description

      Calling Page#setRedirect(Class cls) where the template is JSP will redirect to the .jsp extension instead of .htm.

      Need to patch ClickServlet to check for this scenario.

        Activity

        Hide
        Malcolm Edgar added a comment -

        +1

        Show
        Malcolm Edgar added a comment - +1
        Hide
        Bob Schellink added a comment -

        Fix checked in. Note that the jsp extension is only converted to htm, if the value passed to Page#setRedirect(String) starts with a '/' character. The reason is that you might want to redirect to a real JSP page somewhere in the application. This leaves a backdoor open for such a scenario.

        However the common use case is to use the other setRedirect method: Page#setRedirect(Class) which will work out of the box since it uses getContext().getPagePath(Class) underneath. Calling getPagePath always starts with a '/' character.

        Show
        Bob Schellink added a comment - Fix checked in. Note that the jsp extension is only converted to htm, if the value passed to Page#setRedirect(String) starts with a '/' character. The reason is that you might want to redirect to a real JSP page somewhere in the application. This leaves a backdoor open for such a scenario. However the common use case is to use the other setRedirect method: Page#setRedirect(Class) which will work out of the box since it uses getContext().getPagePath(Class) underneath. Calling getPagePath always starts with a '/' character.
        Hide
        Bob Schellink added a comment -

        fixed checked into trunk and backported to 1.4.1

        Show
        Bob Schellink added a comment - fixed checked into trunk and backported to 1.4.1

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Bob Schellink
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development