Hi,

I was wondering if a way to access the ServletContext could be added to the code. This would be useful for Spring and I presume other IoC frameworks. It would not tie Restlet to any other libraries or harm it as far as I can see.

As per shloks example, it would require changes to com.noelios.restlet.ext.servlet.ServerServlet and org.restlet.Application

com.noelios.restlet.ext.servlet.ServerServlet
   public Application createApplication(Context context) {
...

       if (application != null)
           application.setServletContext(getServletContext());

}


org.restlet.Application.java

   private ServletContext servletContext = null;

   public ServletContext getServletContext() {
       return servletContext;
   }

   public void setServletContext(ServletContext servletContext) {
       this.servletContext = servletContext;
   }

Please let me know what you think,

Best Regards,
Jonathan

Reply via email to