Hi,

I can now load a wadl in my servlet container (thanks to ServerServlet),
but i need to access to the ServletContext. I thought i got a
ServletContextAdapter in my resource constructor, but i get a
ComponentContext.

Indeed, i need the ServletContext to load some spring beans (persistance
layer and other business beans) with the
'WebApplicationContextUtils.getWebApplicationContext' spring method.

Since the WadlComponent is created in the ServerServlet.createComponent
method, it does not know the servlet context.

So, what's the best way to get what i want (load a wadl file and access to
my spring context)?

I tried to not use the restlet.xml way and create a class inheriting
WadlApplication (which is loaded by the createApplication method with the
ServletContextAdapter)... but i don't find a simple way to load my wadl
with this way.

Any help is welcome ;-)

PS: could it make sense doing this in createComponent()?
component.setContext(
new ServletContextAdapter(this, componentcontext));
-- 
Vincent Ricard

Reply via email to