getClassLoader() from ServletContext leads to AccessControlException
<p>I'm trying to do the following (running in Jetty 8):</p>

<pre><code>public class FooListener implements ServletContextListener {
  public void contextInitialized(ServletContextEvent event) {
    event.getServletContext().getClassLoader();
  }
}
</code></pre>

<p>This is what I'm getting:</p>

<pre><code>java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at org.eclipse.jetty.server.handler.ContextHandler$Context.getClassLoader(ContextHandler.java:2179)
at com.example.FooListener.contextInitialized(FooListener.java:69)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:672)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:403)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:664)
</code></pre>

<p>What is it about and how can be solved?</p>
