Click Framework  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: CLK-338
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Malcolm Edgar
Reporter: Bob Schellink
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Click

sendRedirect does not convert jsp extension to htm

Created: 15/Mar/08 09:49 AM   Updated: 15/Mar/08 11:12 PM
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.5 M1 , 1.4.1


 Description  « Hide
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.

 All   Comments   Change History      Sort Order:
Malcolm Edgar [15/Mar/08 01:49 PM]
+1

Bob Schellink [15/Mar/08 10:41 PM]
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.

Bob Schellink [15/Mar/08 11:12 PM]
fixed checked into trunk and backported to 1.4.1