Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: Default Web Modules
- Next: Using the default-web.xml File

## Classloader Delegation

The Servlet specification recommends that the Web Classloader look in the local class loader before delegating to its parent. To make the Web Classloader follow the delegation model in the Servlet specification, set `delegate="false"` in the `class-loader` element of the `sun-web.xml` file. It’s safe to do this only for a web module that does not interact with any other modules.

The default value is `delegate="true"`, which causes the Web Classloader to delegate in the same manner as the other classloaders. Use `delegate="true"` for a web application that accesses EJB components or that acts as a web service client or endpoint. For details about `sun-web.xml`, see The sun-web.xml File.

For general information about classloaders, see Classloaders.

- Previous: Default Web Modules
- Next: Using the default-web.xml File

- © 2010, Oracle Corporation and/or its affiliates