Configuration Documentation

Chrysalis uses several configuration files.

Config file Location Description
web.xml /WEB-INF Standard servlet configuration file.
filter.xml /WEB-INF Configuration for filters in Servlet 2.2 web containers and composite filters.
ChrysalisConfig.xml /WEB-INF/classes Global configuration for the Chrysalis framework.
Controller package chrysalis.xml controller package Configuration file for Chrysalis controllers.
JavaBean package chrysalis.xml controller package JavaBean metadata used by Chrysalis.
Page configuration chrysalis.xml /WEB-INF/classes/page_config View page configuration used by Chrysalis.

The DTDs for the configuration files are located in the src/dtds directory in the Chrysalis distribution.

Chrysalis uses a flexible configuration lookup mechanism to retrieve it configuration data. This mechanism is discussed in more detail in the documentation for the org.chwf.config package.

Directory Structure

Chrysalis web applications should follow the standard directory structure specified in the Servlet standard:

  • [root]: HTML, JSP, Images, etc.
  • /WEB-INF/classes/: Classes outside of jars.
  • /WEB-INF/lib/: Library jars.

The WEB-INF/lib/ directory should include the chrysalis.jar. On Servlet 2.2 containers, it should also contain the servlet-2.3-upgrade.jar, which contains the filter-related classes from the Servlet 2.3 standard.

Application-specific classes can either by in the /WEB-INF/classes/ directory, or in jar files in the /WEB-INF/lib/ directory. Chrysalis loads controller and JavaBean configuration files from the classpath, so that these files can be in either location as well.

Chrysalis Library JARs

The library JARs used by Chrysalis depend on your environment.

  • chrysalis.jar: The core JAR. Always required.
  • chrysalis-servlet-2.3-upgrade.jar: Servlet 2.3 classes used by Chrysalis. Required to use Chrysalis in a Servlet 2.2 container. Not required in Servlet 2.3+ containers.
  • chrysalis-el.jar: Modified classes from the Apache groups implementation of JSTL Expression Language. Required in a Servlet 2.2 container, or if Apache JSTL is not installed. If Apache JSTL is in the servlet engine or web application, this JAR may be omitted.

The above JARs may include version number information in their name, indicating the version of Chrysalis or JSTL on which they are based. JARs that come with a given distribution of Chrysalis have been tested as a unit and should be used together.