Uploaded image for project: 'Click'
  1. Click
  2. CLK-338

sendRedirect does not convert jsp extension to htm

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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
        medgar Malcolm Edgar added a comment -

        +1

        Show
        medgar Malcolm Edgar added a comment - +1
        Hide
        sabob 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
        sabob 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
        sabob Bob Schellink added a comment -

        fixed checked into trunk and backported to 1.4.1

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development