Configuration Details

This file contains the details of Jaxcent configuration.

Servlet/Connector Configuration

The servlet/connector init parameters for Jaxcent are as follows.

JaxcentConfigXML Path to a config XML file, which will contain the path mappings for Jaxcent. Similar to the servlet mappings, Jaxcent maps URLs to Java classes that it then loads, to process those URLs.
ReloadableClasses Classpath for Jaxcent. The classes you write for Jaxcent, will be loaded from this classpath. You can also provide these classes to the application server, but during development it is recommended that you give the classes to Jaxcent directly. Jaxcent will reload these classes whenever they change. If you reload them using the application server, the context may get reloaded, which will break any existing Jaxcent connections. If Jaxcent does the reloading, existing web pages will continue using the old code, but when the page gets loaded again or refreshed, the new code is used.
DisplayServletMessage This can be set to true or false. If set to false, when the servlet URL is typed directly in a browser, it will generate a 404 error code. The default is true.
RefreshULRMap This can be set to true or false. If set to false, Jaxcent will not re-read the XML configuration file whenever it changes. The default is true.
KeepAliveTimeout This can be set to a specific number of seconds after which Jaxcent will send a client-server refresh message if nothing happens in the meanwhile. The default is 290. Note that this is different from the HTTP keep-alive timeout. The Jaxcent keepalive timeout is to tell any servers (e.g. Apache) or gateways that might be in the middle of the client-server connection and might have timeouts, that the Jaxcent connection is still alive and should not be discarded.

In addition, the following init parameters apply only to the connectors:

JVM Path to the Java JVM DLL or library file.
Classpath The (non-reloadable) classpath for the JVM.
LogFile The log file for redirecting Java standard output or standard error messages.

Jaxcent Configuration XML file

For each page, the following items can be configured.

PagePath Specifies the path to map, e.g. "/test/MyTest.html". The path can contain query strings, e.g. "/test/MyTest.html?option1". In this case, Jaxcent will only match incoming requests with that exact query string. If the query string doesn't match, Jaxcent will then remove the query string from the request, and will attempt to match without the query string.
PageClass Specifies fully qualified class name for serving the specified path.
UseSession This can be true or false. The default is false. If set to true, the HTTP session object from the servlet request will be available via the JaxcentPage class. If a session doesn't exist, it will be created. Note that the underlying HTML page doesn't have to be a JSP or a servlet. Even if it is a static page, a session will be added if it doesn't exist, and will be available via Jaxcent.
AutoSessionData This can be set to true or false. The default is false. If set to true, this tells Jaxcent to automatically populate fields of forms from session data during page loading, and to automatically save fields of forms into session data during page unloading.

The Jaxcent session data is stored at the key jaxcent.SessionData in the session object. It can be retrieved for direct use, but should not be modified. The retrieved data should be cast to java.util.Hashtable. The hash table contains entries for all data items found on the forms so far. The data names or ids are used as keys, and are lower-cased before storing the data in the hashtable. If multiple entries on the same page were found for a data name (e.g. if there are multiple checkboxes with the same name), the values will be comma separated. If checkboxes were not selected, an empty string will be stored for them. For dropdown (SELECT) lists, the value stored is in the form

    <selected-index>:<Selected-text>
If AutoSessionData is set to true, UseSession is automatically set to true.