Structure of PRePServlet

    First of all the init() method of the PRePServlet will be called from the servletrunner. There a new PRePHandler (providePRePHandler()) will be created as well as the ConnectionPool initialised (default values).

    As soon as a request from the servletrunner arrives, the handle() method of the PRePServlet is called. This method handles the request and does everything from setting the PrintWriter to the login and finally output of the PRePFile. It is build out of different methods which all work over the PRePHandler. The PRePHandler is unique - unlike the PRePMain which is given to the PRePServlet at the beginning. It will be deleted after the handle() method finished.

    If the servletrunner closes, it calls the destroy() method of the PRePServlet class which itself calls the destroy() method of the PRePHandler class. The ConnectionPool will be destroyed and its connection closed one for one.

    As in the documentation for the JSDK2.0 described, you need a servlet.properties file, where you may define a name (servlet..code=). You also may define the path for the config.file by writing the following:

    servlet.PRePServlet.initArgs=\
    config=p:\\global\\commongw\\sources\\com\\delec\\prep\\config.file

    Please notice the doubled file separator if you use the back slash.

    Related sites:
Class information about PRePServlet
Back