Sokrates Documentation
- How does it work ? |
For understanding the various configuration options it essential to understand how Sokrates is internally structured. There are 4 main parts:
The servlet container itself will start the the servlet intances. How many instances are created is defined by the instances parameter in the your specific servlet configuration file (sv_demo.ini for example). Different from some other servlet runners, like Apache JServe, all servlet instances are created at startup. We chose this approach because bigger servlets have a complex and slow startup procedure and we want it to be ready by the time the first request comes in. When creating the servlet instance, Sokrates is connecting to the Webserver too. Which webserver to use is defined by the host and port parameter in the servlet container configuration. Both parameters gets their defaults from the default_host and default_port parameters in the runner.ini so there is usually no need to set this parameters in the servlet container configuration. If you want to restrict your servlet to a specific virtual host, use the parameter virtualhost. The default is to listen to any virtual host of the webserver which makes it easy to create central servlet applications such as an e-mail servlet. classpath defines the path where the servletrunner should find its classes AND additional ressources (see HttpServletRequest#getResourceAsStream(...) and HttpServletRequest#getResource(...)). The path can be an absolute or relative path or a JAR or ZIP file. Entries are separated by semicolons (;). If a path is a relative path, it's offset by the path of servlet_cfg to this .ini file. The sample .ini files (sv_demo.ini and runner.ini) are well documented and should help you in configuring your servlet runner. |
Main
- Installation - Stopping and Restarting - Adding New Servlets - Better
Structures - How does it work ? -
Sessions - |