Sokrates Documentation - Adding new Servlets

Adding new Servlets is a task which can be done in seconds. We will talk later about advanced techniques; for now we simply like to get a servlet running.
  1. Create a new configuration file for your servlet by copying sv_demo.ini  to sample.ini .
  2. In the new configuration change at least this parameters to new values:
    servletidentifier
    processname
    class
  3. Add this new configuration file to runner.ini by adding a line like
    servlet_cfg=sample.ini
  4. Restart the servlet runner as described before.

Example
As an example, we will install the Webmail Servlet from ColdBeans software.
  1. Download the WebMail.class, smtpMail.class  and mailconf  from http://coldjava.hypermart.net/servlets/webmail.htm
  2. Copy the downloaded files to your runner directory (c:\runner\ for example)
  3. Edit mailconf  (at least the dir parameter dir=c:\\runner\\)
  4. Copy sv_demo.ini to webmail.ini
  5. Edit webmail.ini
    servletidentifier = /webmail
    processname=webmail
    class = WebMail
    config.config = c:\\runner\\mailconf

  6. Edit runner.ini :
    Add a line named servlet_cfg=webmail.ini somewhere or near the existing servlet_cfg entry.
  7. Restart Sokrates as described in the previous chapter.
  8. Try http://127.0.0.1/webmail
It isn't really working because you have to edit mailconf according to the description on the homepage of the software but its enough for a sample.

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