Hi Jonathan, When using the ServerServlet, the Restlet's context already wraps the Servlet's context (logging, resource loading, parameters, etc.). Why would you need a direct access to the Servlet context?
Best regards, Jerome > -----Message d'origine----- > De : Jonathan Hall [mailto:[EMAIL PROTECTED] > Envoyé : mardi 6 mars 2007 20:27 > À : [email protected] > Objet : Servlet Context > > 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 >

