In Lift 1.1, there is no S.servletSession method. Without a session, you cannot find the context and even with a session, you have to look to see if the session is associated with a particular provider (Lift-speak for the thing that's forwarding requests to Lift).
Your best bet is to go find some Java static thing that's going to give you the ServletContext On Wed, Oct 7, 2009 at 1:12 AM, rintcius <[email protected]> wrote: > > Yes, but I am referring to the case when there is no Full(session). > I.e. how do I get the servlet context in the 2nd case at the place > where I am currently throwing a RTE. > > def servletContext = { > S.servletSession match { > case Full(session) => session.getServletContext() > case _ => throw new RuntimeException("no session") > } > } > > > > > > -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
