title: How GWT RPC loads the serialization policy files?
body: <p>I'm researching a solution for an issue with <a href="https://stackoverflow.com/questions/11136105/issues-with-gwt-in-osgipax-web-using-declarative-services">GWT and OSGi+PAX-Web</a>. The particular problem is that GWT cannot load the serialization policy file, giving the following error:</p>
  
  <p><code>ERROR: The serialization policy file '/ctx/ctx/6ExxxxxxxxxxxxxxxxF.gwt.rpc' was not found; did you forget to include it in this deployment?</code> </p>
  
  <p>The problem lies somewhere between Equinox OSGi and PAX-WEB.</p>
  
  <p>To find a solution, I would like  to better understand how GWT-RPC is loading the serialization policy files.</p>
  
  <ul>
  <li>What is their lifecycle? When are they loaded? (I see it's on server startup. Any particularities in the lifecycle? Reload?)</li>
  <li>How GWT loads this file in its stack? At what point in the call stack of a request? How does GWT knows where to load them from? Can I tell GWT where it should look for this file? </li>
  </ul>
  
  <p>(disclaimer: I've read the gwt docs on the generated files <a href="http://code.google.com/p/google-web-toolkit-doc-1-6/wiki/FAQ_GWTApplicationFiles" rel="nofollow noreferrer">[2]</a>. I'm looking for more low-level details: I've the impressions that the error we are having has to deal with HttpContext.getResource())</p>