restseasy version please? On 6/20/2013 6:13 AM, buko wrote: > Took another shot at it but still couldn't get a reference to the > ServletContext. Adding the RestEasyBootstrap ServletContextListener to > Jetty doesn't help nor does trying to subclass HttpServletDispatcher and > trying to intercept the application creation. > > > On Wed, Jun 19, 2013 at 6:45 PM, buko <b...@chiubarobot.com > <mailto:b...@chiubarobot.com>> wrote: > > I'm trying the following: > > > {code} > int port = 9999; > Server server = new Server(port); > > ServletContextHandler siteContext = new > ServletContextHandler(server, "/site", ServletContextHandler.SESSIONS > | ServletContextHandler.SECURITY); > ServletHolder servletHolder = new ServletHolder(new > HttpServletDispatcher()); > servletHolder.setInitParameter("javax.ws.rs.Application", > MySite.class.getName()); > siteContext.addServlet(servletHolder, "/*"); > server.setHandler(siteContext); > > server.start(); > server.join(); > } > > public class MySite extends Application { > > @Context ServletContext config; > } > {code} > > > config always ends up being null. > > On 6/19/13, Bill Burke <bbu...@redhat.com > <mailto:bbu...@redhat.com>> wrote: > > You should be able to. Would be cool to also state in your email > if you > > actually tried it and on what version of resteasy. > > > > On 6/18/2013 9:20 PM, buko wrote: > >> I can't seem to find a definitive answer to this but is it > possible to > >> @Context inject a ServletContext or ServletConfig into a > >> javax.ws.rs.core.Application implementation when RestEasyis deployed > >> into a Servlet container? > >> > >> > >> > >> > >> > > ------------------------------------------------------------------------------ > >> This SF.net email is sponsored by Windows: > >> > >> Build for Windows Store. > >> > >> http://p.sf.net/sfu/windows-dev2dev > >> > >> > >> > >> _______________________________________________ > >> Resteasy-users mailing list > >> Resteasy-users@lists.sourceforge.net > <mailto:Resteasy-users@lists.sourceforge.net> > >> https://lists.sourceforge.net/lists/listinfo/resteasy-users > >> > > > > -- > > Bill Burke > > JBoss, a division of Red Hat > > http://bill.burkecentral.com > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by Windows: > > > > Build for Windows Store. > > > > http://p.sf.net/sfu/windows-dev2dev > > _______________________________________________ > > Resteasy-users mailing list > > Resteasy-users@lists.sourceforge.net > <mailto:Resteasy-users@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > >
-- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users