users@jersey.java.net

is there a way to get hold of the resource bean from inside a MessageBodyWriter? (and Lift templates are kinda working...)

From: James Strachan <james.strachan_at_gmail.com>
Date: Thu, 14 May 2009 08:56:29 +0100

I can get hold of the body (the return value of the resource method)
from the MessageBodyWriter interface and I can get the
request/response/context/servletcontext injected - I'm just wondering
if there's a clever way of getting the resource bean itself?

The background to this is I've just about got Lift templates to work
with Jersey (yay!) - using implicit views or having a Scala resource
method return a template instance
http://github.com/jstrachan/liftweb/tree/master/lift-jersey

(currently the code depends on master of liftweb and might need a few
more lift tweaks to be complete, so I'm thinking for now the code
might be best inside the lift project itself)

I'd like to expose the resource bean so it can be used by lift
snippets in a canonical way, whether via the LiftTemplateProcessor or
via the NodeWriter...
http://github.com/jstrachan/liftweb/tree/master/lift-jersey/src/main/scala/net/liftweb/jersey/test/

but wasn't sure yet how to find it from inside NodeWriter - anyone any ideas?

-- 
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/