Sokrates Documentation - Better structures

In the previous chapter we simply threw our data into the runner directory. When dealing with more and more servlets we need a cleaner structure where the servlets are seperated into different directories.

At first we shall move the log files of Sokrates out of the way and beautify them a little bit:
  1. Edit runner.ini  and set logfile_path=logfiles. This will create the new logfiles in a directory named logfiles under your current runner directory.
  2. You may set logfile_praefix and logfile_suffix to empty to get logfiles named yyyymmdd (like "20020712")
  3. To get a somewhat nicer output from the .log option of GenericServlet/HttpServler you may set logfile_remove_classname=1 in runner.ini  to strip the classname from the output.

We can also do this with our servlet configuration (the "servlet container").  Sokrates will help you here by shifting some path dependent values in your container configuration according to your srvl_cfg path settings.

Let's do this with the previous Webmail example:
  1. Create a webmail  directory under your runner directory
  2. Move mailconf, smtpMail.class, WebMail.class and webmail.ini into the newwebmail  directory.
  3. Edit runner.ini  and change servlet_cfg=webmail\\webmail.ini (or servlet_cfg=webmail/webmail.ini on *nix based file systems).
  4. Edit webmail.ini  and set
    logfile_path=logfiles
    logfile_praefix=
    logfile_suffix=
    logfile_options=!?S
    logfile_remove_classname=1
  5. We have to tell the application about the new location too ...
    In webmail.ini  set config.config = webmail\\mailconf
    In mailconf  set dir=webmail\\
  6. That's it!
The additional path in srvl_cfg will shift the following settings in your container configuration:
  • classpath
  • config
  • logfile_path

Main - Installation - Stopping and Restarting - Adding New Servlets - Better Structures - How does it work ?Sessions -