On Thu, Feb 4, 2010 at 2:06 PM, Ross Mellgren <dri...@gmail.com> wrote:

> RedirectTo should automatically prepend the context path. Could you try
> writing a quick snippet that dumps S.request.map(_.contextPath),
> S.session.map(_.contextPath) and finally S.contextPath and see what they
> output?
>

Okay... so this is a bug.

**Marius** heads up!

We made a change a little while ago to abstract Lift away from the
particular container it's running in and the context path is calculated
dynamically based on the current request rather than being set statically at
Lift Servlet load time.

CometActors do not run in the scope of any HTTP requests.  I'm guessing that
the context path is not getting to the CometActor.

Please file a ticket at
https://liftweb.assembla.com/spaces/liftweb/ticketsand Marius will
look into it.


>
> -Ross
>
> On Feb 4, 2010, at 5:03 PM, Java1Guy wrote:
>
> > This sure seems like it should be a simple problem, but I sure can't
> > find the answer.
> >
> > I have a simple CometActor page with an ajaxButton on it.  I want the
> > button to go to a different page.  No problem - except when I deploy
> > it into a jetty container where it isn't in the root context, it
> > doesn't work!
> >
> >            SHtml.ajaxButton(
> >                    Text("Home"),
> >                    () => RedirectTo("/index")
> >            ),
> >
> > works fine in "mvn jetty:run" but when deployed it doesn't get the URL
> > re-writing facility?
> >
> > Tried RedirectTo(S.hostAndPath+"/index") - no help.
> > and RedirectTo(S.contextPath+"/index") - no help.
> >
> > I even found some code here which seemed to suggest a fix:
> >    val loc = (for {
> >       loc <- SiteMap.findLoc("Login")
> >       path <- loc.createDefaultPath
> >    } yield path.text) openOr "/"
> > But this doesn't compile in the 2.0-M1 world...
> > Shouldn't this be simple?
> >
> > Thanks in advance,
> > Mark
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Lift" group.
> > To post to this group, send email to lift...@googlegroups.com.
> > To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to