The following code shows a simple Java class that can be registered inside the startup process of Application Designer:
package com.softwareag.cis.test;
import javax.servlet.*;
import com.softwareag.cis.server.*;
public class StartDemo
implements IServletInitHandler
{
public void init(ServletConfig conf)
{
System.out.println("StartDemo: started!");
System.out.println("StartDemo: started!");
System.out.println("StartDemo: started!");
System.out.println("StartDemo: started!");
System.out.println("StartDemo: started!");
}
public void destroy()
{
System.out.println("StartDemo: destroyed!");
System.out.println("StartDemo: destroyed!");
System.out.println("StartDemo: destroyed!");
System.out.println("StartDemo: destroyed!");
System.out.println("StartDemo: destroyed!");
}
}
It supports the interface
com.softwareag.cis.server.IServletInitHandler that requires the
implementation of the methods init and
destroy. The init method takes the
servlet configuration as parameter with which the Application Designer's servlet itself is initialised.
See the documentation of the servlet functions (e.g. in the reference documentation for
the servlet API) for more details.