title: Rest easy and init params - how to access?
body: <p>I'd like to have some init params in my web.xml and retrieve them later in the application, I know I can do this when I have a normal servlet. However with resteasy I configure HttpServletDispatcher to be my default servlet so I'm not quite sure how I can access this from my rest resource. This might be completely simple or I might need to use a different approach, either way it would be good to know what you guys think. Following is my web.xml,</p>
  
  <pre><code>&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
   &lt;display-name&gt;RestEasy sample Web Application&lt;/display-name&gt;
  &lt;!-- &lt;context-param&gt;
          &lt;param-name&gt;resteasy.scan&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;  --&gt;
  
   &lt;listener&gt;
       &lt;listener-class&gt;
           org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
       &lt;/listener-class&gt;
   &lt;/listener&gt;
  
   &lt;servlet&gt;
       &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
       &lt;servlet-class&gt;
           org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
       &lt;/servlet-class&gt;
       &lt;init-param&gt;
           &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
           &lt;param-value&gt;com.pravin.sample.YoWorldApplication&lt;/param-value&gt;
       &lt;/init-param&gt;
   &lt;/servlet&gt;
  
   &lt;servlet-mapping&gt;
       &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
       &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>My question is how do I set something in the init-param and then retrieve it later in a restful resource. Any hints would be appreciated. Thanks guys!</p>