<JetConfig
project-name="testconfig"
>
<!-- the project name has no special meaning, it's only a identifier for the project used. //-->
encoding: Setting the input and output charset encoding of JET pages.
formpoolsize: Setting the amount of prebuild forms in jet.pool.ObjectPool.
actionpoolsize: Same as with the form pool - just for the actions defined.
<JetServlet
encoding="UTF-8" formpoolsize="30" actionpoolsize="40"
>
For the most setups the debug modus would be a security reason. therefore you can define for which ip and/or server names it is allowed to access the debug modus.
Example:
http://<server>:/webapp/index.ftl?jetdebug=true
NOTE: the debug modus is session based - to disable the debug modus call a jet page with ?jetdebug=false
<JetDebug>
127.0.0.1
</JetDebug>
Same as above. With "jetrefresh" you can refresh the caches, not the ObjectPools (they don't need to be refreshed). Example:
http://<server>:/webapp/index.ftl?jetrefresh=all
Available commands are:
all = refreshing all caches.
localizer = refreshing localizer cache.
resourcecache = refreshing the cache for the javascript validation etc.
resourceservlet = refreshing the caches of the resource servlet.
templateengine = refreshing the freemarker template engine.
<JetRefresh>
127.0.0.1
</JetRefresh>
Same as above. Example:
http://<server>:/webapp/index.ftl?jetstatus
<JetStatus>
127.0.0.1
</JetStatus>
Setting the localizer files to use (comma separated list).
<JetLocalizers>
MessageResourses
</JetLocalizers>
With
<JetInjector>
you can add injectors to the method based injection.
<JetInjector>
jet.servlet.JetInjector
</JetInjector>
As follows you can define plugins, these plugns are loaded/activated before the initialzation of the JetServlet is done. You would have access to the Servletconetxt, so you are able to load/initilaize caches etc.
<JetPlugin
class="jet.examples.ExamplePlugin"
/>
As follows you can specify global exception handlers e.g. to avoid displaying errors happened in your action e.g. database down etc.
<JetExceptionHandler>
jet.examples.GlobalExceptionExamples#displayException
</JetExceptionHandler>
For configuring the template engine you can specify an configurator which provides a Properties object with Freemarker parameters and some special jet parameters.
The following properties could be set:
freemarker parameters
parameter defined by jet:
default_encoding -> the default encoding for the templates
template_update_delay -> delay for updating templates from source
<FreemarkerConfigurator>
jet.freemarker.FreemarkerConfigurator#getProperties
</FreemarkerConfigurator>
</JetServlet>
<JetInput>
<!-- defining form elements - see 3.1 Defining forms //--!>
</JetInput>
...
<JetForm>
<!-- defining the form - see 3.1 Defining forms //--!>
</JetForm>
...
<JetAction>
<!-- defining the action - see 2.1 Defining actions //--!>
</JetAction>
...
In your web.xml you can specify more than one config file, so you can separate the different parts of your webapp in smaller peaces.