Yeah I'm currently approaching the stateful aspect of Lift with some trepidation, so for now trying to avoid it, for exactly this type of reason.
If someone could point out how to disable the mechanism that is redirecting the page, and making periodic ajax requests I'd appreciate it, thanks! - Alex On Nov 19, 6:54 pm, David Pollak <feeder.of.the.be...@gmail.com> wrote: > On Thu, Nov 19, 2009 at 3:31 PM, Alex Black <a...@alexblack.ca> wrote: > > thanks for the explanation. Can you tell me a bit more about that? > > Not knowing anything about this it seem unfamiliar to me. > > > Say we had customers using our site, and we restarted one of our > > webservers, the customers wouldn't expect to be redirected to "/". > > They'd expect to just keep on browsing as if nothing had happened. > > In the more recent versions of Lift, the browsers will be redirected to the > page that they are on. > > But, if there are forms, ajax elements, etc. and you restart the server, the > current state will be lost and the users will experience a "this thing isn't > working" so we refresh the user's current page so they have a better chance > of having the right experience. > > If you don't like the feature, you can turn it off in LiftRules (I don't > remember the property off hand, but I'm sure someone else can help me.) > > > > > > > On Nov 19, 6:28 pm, David Pollak <feeder.of.the.be...@gmail.com> > > wrote: > > > On Thu, Nov 19, 2009 at 3:18 PM, Alex Black <a...@alexblack.ca> wrote: > > > > I just did some work, restarted jetty, and upon startup saw that it > > > > processed two requests (that I hadn't initiated): > > > > > INFO - Service request (POST) /ajax_request/F374747850325CGX/ took 104 > > > > Milliseconds > > > > INFO - Service request (GET) / took 22 Milliseconds > > > > > I then looked at my browser and it has somehow gone back to "/" from > > > > the page it was on. > > > > > thoughts? > > > > This is defined behavior. The Lift app will reload the current page on > > app > > > server restart (for 1.1-M6+) or "/" for prior versions of Lift. > > > > > On Nov 19, 5:40 pm, David Pollak <feeder.of.the.be...@gmail.com> > > > > wrote: > > > > > If you're doing mvn jetty:run, please edit your pom.xml and change: > > > > > > <scanIntervalSeconds>5</scanIntervalSeconds> > > > > > > to > > > > > > <scanIntervalSeconds>0</scanIntervalSeconds> > > > > > > On Thu, Nov 19, 2009 at 2:32 PM, Alex Black <a...@alexblack.ca> > > wrote: > > > > > > I've been developing a REST api using Lift, and have just added > > some > > > > > > basic html templates to it, and started using a snippet or two. > > > > > > > As I'm testing out my pages I'm noticing a number of odd things: > > > > > > 1. Often when I alt tab back to my browser, its not on the page i > > left > > > > > > it on (sayhttp://localhost:8080/mypage.html), instead its on > > > > > >http://localhost:8080/somehow. > > > > > > > 2. I'm seeing requests in the jetty console like this: > > > > > > > INFO - Service request (POST) /ajax_request/F119708427865SPY/ took > > 52 > > > > > > Milliseconds > > > > > > > I'm not using any AJAX at the moment, is there a way to turn this > > off? > > > > > > > 3. Again, seemingly randomly, I get "Couldn't start SessionMaster > > > > > > ping" errors: > > > > > > > ERROR - Couldn't start SessionMaster ping > > > > > > net.liftweb.util.ActorPingException: net.liftweb.http.SessionMaster > > > > > > $checkandpur...@6326c98 could not be scheduled on > > > > > > net.liftweb.http.sessionmast...@58777255 > > > > > > at net.liftweb.util.ActorPing$.schedule(ActorPing.scala:51) > > > > > > at > > > > net.liftweb.http.SessionMaster$.net$liftweb$http$SessionMaster$ > > > > > > $doPing(LiftSession.scala:209) > > > > > > at > > net.liftweb.http.SessionMaster$$anonfun$act$1$$anonfun$apply > > > > > > $1.apply(LiftSession.scala:200) > > > > > > at > > net.liftweb.http.SessionMaster$$anonfun$act$1$$anonfun$apply > > > > > > $1.apply(LiftSession.scala:169) > > > > > > at scala.actors.Reaction.run(Reaction.scala:79) > > > > > > at > > scala.actors.threadpool.ThreadPoolExecutor.runWorker(Unknown > > > > > > Source) > > > > > > at > > scala.actors.threadpool.ThreadPoolExecutor$Worker.run(Unknown > > > > > > Source) > > > > > > at java.lang.Thread.run(Thread.java:619) > > > > > > Caused by: java.util.concurrent.RejectedExecutionException > > > > > > at java.util.concurrent.ThreadPoolExecutor > > > > > > $AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1760) > > > > > > at java.util.concurrent.ThreadPoolExecutor.reject > > > > > > (ThreadPoolExecutor.java:767) > > > > > > at > > > > java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute > > > > > > (ScheduledThreadPoolExecutor.java:216) > > > > > > at java.util.concurrent.ScheduledThreadPoolExecutor.schedule > > > > > > (ScheduledThreadPoolExecutor.java:379) > > > > > > at java.util.concurrent.Executors > > > > > > $DelegatedScheduledExecutorService.schedule(Executors.java:654) > > > > > > at net.liftweb.util.ActorPing$.schedule(ActorPing.scala:49) > > > > > > ... 7 more > > > > > > > I might well have butchered something - when I started I removed > > some > > > > > > of the boiler plate stuff created by the archetype that I didn't > > see > > > > > > as necessary for the REST web service. > > > > > > > But, stuff is generally working, I can add templates, call snippets > > > > > > from them etc. > > > > > > > Thanks, > > > > > > > - Alex > > > > > > > -- > > > > > > > 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> > > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com> > > > > > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com> > > <liftweb%252bunsubscr...@googlegroups.com<liftweb%25252bunsubscr...@googlegroups.com> > > > > > > > . > > > > > > For more options, visit this group at > > > > > >http://groups.google.com/group/liftweb?hl=. > > > > > > -- > > > > > Lift, the simply functional web frameworkhttp://liftweb.net > > > > > Beginning Scalahttp://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<liftweb%2bunsubscr...@googlegroups.com> > > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/liftweb?hl=. > > > > -- > > > Lift, the simply functional web frameworkhttp://liftweb.net > > > Beginning Scalahttp://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<liftweb%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/liftweb?hl=. > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://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=.