Class loading order for Web applications

EAServer loads classes listed in the Web application custom class list by searching the following code bases, in the order specified. All of these locations are subdirectories of your EAServer installation directory, app_name represents the name of your Web application, and server is the server where the Web application is installed. If the custom class loader cannot locate a class file, the server attempts to load it using the system class loader.

  1. Class files in work/server/Servlet/WebApp-app_name

    This directory contains generated servlet classes for compiled JSPs.

  2. Class files in Repository/WebApplication/app_name/WEB-INF/classes

    This is the standard directory for servlet, filter, tag-library, and utility classes used by the Web application. If utility classes are shared with Java components running on the same server, you may wish to move them to the EAServer java/classes subdirectory and add them to the custom class list for your application or server.

  3. JAR files in Repository/WebApplication/app_name/WEB-INF/lib

    This is the standard location for JAR files that contain classes to be used only by this Web application. EAServer searches the JAR files in the order specified by the com.sybase.jaguar.webapplication.jarlist property. If you do not JAR files in this property, EAServer searches in directory order; that is, the order that would be returned in a directory listing.

  4. JAR files in extensions

    This directory contains JAR files that have been installed as Web application extensions—see “Using Java extensions”. EAServer places these JAR files in the Web application’s default custom class list, in directory order.

  5. JAR files in the java/classes directory that are listed in the custom class list for the servlet, JSP, or Web application.

  6. Class files in the java/classes and html/classes directory that are specified in the custom class list for the servlet, JSP, or Web application.

  7. JAR files in the java/lib directory that are listed in the custom class list for the servlet, JSP, or Web application.

  8. If the class has not been found, the server attempts to load the class using the system class loader, using the search order in the server class path—see “The system class loader”.