[
http://www.avoka.com:8080/jira/browse/CLK-429?page=all ]
Bob Schellink closed CLK-429.
-----------------------------
> Move ClickServlet jsp to htm extension conversion to Page.setRedirect()
> -----------------------------------------------------------------------
>
> Key: CLK-429
> URL:
http://www.avoka.com:8080/jira/browse/CLK-429> Project: Click
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.4.2
> Reporter: David Ballard
> Assigned To: Bob Schellink
> Priority: Minor
> Fix For: 1.5 RC1
>
>
>
http://article.gmane.org/gmane.comp.web.click.user/2515> I am trying out Click 1.4.2 in a web app that has existing legacy jsp pages. In particular situations, I need to redirect from a click page to one of these jsp pages. For example, in MyPage:
> public boolean onSecurityCheck() {
> setRedirect("/jsp/legacy.jsp");
> return false;
> }
> This results in a redirect to "
http://myhost/context/jsp/legacy.htm".
> ClickServlet.processPage() performs a hard-wired conversion of "/jsp/legacy.jsp" to "/jsp/legacy.htm". This was added I think by CLK-338. In my case, I have no intention of using jsp with click servlet, so I would prefer that this conversion be optional.
> My workaround is:
> String contextPath = getContext().getRequest().getContextPath();
> javax.servlet.http.HttpServletResponse response = getContext().getResponse();
> String url = response.encodeRedirectURL(contextPath + "/jsp/legacy.jsp");
> try {
> response.sendRedirect(url);
> }
> catch(java.io.IOException e) {
> throw new RuntimeException(e);
> }
> setPath(null);
> Anyone see any issues with this?
> Would it be tough to make the "jsp" to "htm" conversion be configurable?
> ---
> From Bob:
> We can move the conversion logic to Page#setRedirect method. That way its easier to overload or subclass.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.avoka.com:8080/jira/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Click-development mailing list
Click-development@...
https://lists.sourceforge.net/lists/listinfo/click-development