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:
- Edit runner.ini and set logfile_path=logfiles.
This will create the new logfiles in a directory named logfiles under
your current runner directory.
- You may set logfile_praefix and logfile_suffix
to empty to get logfiles named yyyymmdd (like "20020712")
- 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:
- Create a webmail directory under your runner directory
- Move mailconf, smtpMail.class, WebMail.class
and webmail.ini into the newwebmail directory.
- Edit runner.ini and change servlet_cfg=webmail\\webmail.ini
(or servlet_cfg=webmail/webmail.ini on *nix based file systems).
- Edit webmail.ini and set
logfile_path=logfiles
logfile_praefix=
logfile_suffix=
logfile_options=!?S
logfile_remove_classname=1
- We have to tell the application about the new location too ...
In webmail.ini set config.config = webmail\\mailconf
In mailconf set dir=webmail\\
- That's it!
The additional path in srvl_cfg will shift the following settings
in your container configuration:
- classpath
- config
- logfile_path
|