JsCmds.RedirectTo not properly handling context path
When deployed to the "/mt" context in Jetty, this code:
<span>Here's request map: {S.request.map(_.contextPath)}</span>
<span>Here's session map: {S.session.map(_.contextPath)}</span>
<span>and finally S.contextPath: {S.contextPath}</span>
Yields:
Here's request map: Full(/mt)Here's session map: Full(/mt)and finally
S.contextPath: /mt
Yet neither of these buttons go to the right place:
"homeButton" ->
SHtml.ajaxButton(
Text("Home"),
() => RedirectTo("/index")
),
"hiddenButton" ->
SHtml.ajaxButton(
Text("Hidden"),
() => RedirectTo(S.contextPath+"/hidden")
)
[I was experimenting to see if having the Loc declared Hidden in the Boot made a difference -- seems not.]
Scala 2.7.7
Lift 2.0-M1
<span>Here's request map: {S.request.map(_.contextPath)}</span>
<span>Here's session map: {S.session.map(_.contextPath)}</span>
<span>and finally S.contextPath: {S.contextPath}</span>
Yields:
Here's request map: Full(/mt)Here's session map: Full(/mt)and finally
S.contextPath: /mt
Yet neither of these buttons go to the right place:
"homeButton" ->
SHtml.ajaxButton(
Text("Home"),
() => RedirectTo("/index")
),
"hiddenButton" ->
SHtml.ajaxButton(
Text("Hidden"),
() => RedirectTo(S.contextPath+"/hidden")
)
[I was experimenting to see if having the Loc declared Hidden in the Boot made a difference -- seems not.]
Scala 2.7.7
Lift 2.0-M1
Leave a comment
(from github) This is NOT a support forum. See http://groups.google.com/group/liftweb/browse_thread/thread/0c7a97cbf60780f0?hl=en