On Wed, Sep 9, 2009 at 1:53 AM, XiaomingZheng <[email protected]>wrote:
> > after learning how to use this framework, i am curious about its > mechanism inside. Who invokes the snippets directly? Is it the > LiftSession? Yes, the LiftSession instance finds and invokes the snippet while it's processing > Because i saw processSnippet method in its source code. > if it is, means all snippets must be invoked in a session? Yes. > and what > differences between stateful and stateless request? thank u~~~ > Snippets are part of Lift's XHTML rendering pipeline. XHTML (stuff for display in a browser) is by default served via this pipeline. You can, however, register to service a particular URL either within the session context or outside the session context. In this case, you are responsible for generating a LiftResponse to send that satisfies the request. So, if you're doing a session-less RESTful service, you could register to service a given URL. If you're doing a session-oriented REST or SOAP service or generating a unique PDF file or some other thing that you're sending over HTTP, you can register to service the URL and generate a response. I hope this helps. Thanks, David > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
