Using Lift's snippet processing outside of Lift
Is there a way to use Lift's snippet processing outside the nor开发者_如何学JAVAmal request handling process? I know I can call LiftSession.findAndProcessTemplate
, but that obviously requires an instance of LiftSession
. Is there a way to do that without LiftSession as long as I only use stateless snippets? Alternatively, is there a way to get an "empty" instance of LiftSession
?
Sure, you can use net.liftweb.http.S.runTemplate:
http://scala-tools.org/mvnsites/liftweb-2.4-M4/#net.liftweb.http.S
精彩评论