[Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
From mvn jetty:run: Here's request map: Full()Here's session map: Full()and finally S.contextPath: From jetty Here's request map: Full(/mt)Here's session map: Full(/mt)and finally S.contextPath: /mt WTF? My actor code is: bind(f, defaultXml, nakedHomeButton - SHtml.ajaxButton( Text(Home), () = RedirectTo(/index) ), homeButton - SHtml.ajaxButton( Text(Home), () = RedirectTo(S.hostAndPath+/index) ), hiddenButton - SHtml.ajaxButton( Text(Hidden), () = RedirectTo(S.contextPath+/hidden) ) ) And ALL of them do NOT put in the /mt... (FWIW, i'm on Jetty 6.1.20, Scala 2.7.7 and Lift 2.0-M1) Thanks for looking! -- 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.
[Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
FWIW, my Jetty config I tried to make as simple as possible: Set name=contextPath/mt/Set Set name=warSystemProperty name=jetty.home default=.// webapps/menutest-1.0-SNAPSHOT.war/Set Set name=extractWARfalse/Set Set name=copyWebDirfalse/Set Set name=defaultsDescriptorSystemProperty name=jetty.home default=.//etc/webdefault.xml/Set -- 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.
Re: [Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
So are you saying that if you run it via jetty:run it doesn't behave properly, but it does if you run it from jetty outside of mvn? Or that in both cases it does not behave? I'm not sure exactly what you mean by from jetty so I think it might be important. To set your context path from mvn jetty:run, you can use contextPath in pom.xml: project ... ... build ... plugins plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId configuration contextPath/mt/contextPath /configuration /plugin ... /plugins ... /build ... /project -Ross On Feb 4, 2010, at 5:31 PM, Java1Guy wrote: From mvn jetty:run: Here's request map: Full()Here's session map: Full()and finally S.contextPath: From jetty Here's request map: Full(/mt)Here's session map: Full(/mt)and finally S.contextPath: /mt WTF? My actor code is: bind(f, defaultXml, nakedHomeButton - SHtml.ajaxButton( Text(Home), () = RedirectTo(/index) ), homeButton - SHtml.ajaxButton( Text(Home), () = RedirectTo(S.hostAndPath+/index) ), hiddenButton - SHtml.ajaxButton( Text(Hidden), () = RedirectTo(S.contextPath+/hidden) ) ) And ALL of them do NOT put in the /mt... (FWIW, i'm on Jetty 6.1.20, Scala 2.7.7 and Lift 2.0-M1) Thanks for looking! -- 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. -- 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.
[Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
Ross: no, the opposite. in mvn jetty:run all is well since it is in the root context. (?) When I deploy the war to jetty and use the /mt context all the ajaxButtons insist on going to the root. PS - although i've had trouble before, 2.0-M1 seems *more* broken :( On Feb 4, 3:37 pm, Ross Mellgren dri...@gmail.com wrote: So are you saying that if you run it via jetty:run it doesn't behave properly, but it does if you run it from jetty outside of mvn? Or that in both cases it does not behave? I'm not sure exactly what you mean by from jetty so I think it might be important. To set your context path from mvn jetty:run, you can use contextPath in pom.xml: project ... ... build ... plugins plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId configuration contextPath/mt/contextPath /configuration /plugin ... /plugins ... /build ... /project -Ross -- 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.
[Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
I think David's analysis is exactly right: CometActors do not run in the scope of any HTTP requests. I'm guessing that the context path is not getting to the CometActor. As the button text I put S.contextPath+/index and sure enough, it shows /index - even though the above output shows that to the normal snippet, the context path is set. Cheers, 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. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Re: How to make JsCmds.RedirectTo context path sensitive?
Yes very well could be. I was part of the email chain when Marius implemented these changes and I thought that this was why LiftSession has a copy of the contextPath. Taking a quick glance at the code it should work with that, but Marius should definitely comment since he's most familiar with those changes. -Ross On Feb 4, 2010, at 5:59 PM, Java1Guy wrote: I think David's analysis is exactly right: CometActors do not run in the scope of any HTTP requests. I'm guessing that the context path is not getting to the CometActor. As the button text I put S.contextPath+/index and sure enough, it shows /index - even though the above output shows that to the normal snippet, the context path is set. Cheers, 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. 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. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.