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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        13h 22m 1 Bob Schellink 16/Mar/08 06:12
        Henri Yandell made changes -
        Project Import Fri Mar 20 14:11:32 PDT 2009 [ 1237583492744 ]
        Bob Schellink made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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
        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
        Malcolm Edgar added a comment -

        +1

        Show
        Malcolm Edgar added a comment - +1
        Bob Schellink created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development