Kelp Sample Project


This sample demonstrates some basic features of XMLC and how to work with MultiServer and XMLC using Kelp.
JDeveloper Kelp 1.2 Documentation

Running The Sample
  1. Configure the application using the Enhydra Configure wizard.
    1. From the JDeveloper menu select Wizards | Enhydra Configure.
    2. On the Selections tab, select the KelpSample.conf.in, and multiserver.conf.in files.
    3. Click on the Configure button to update the application and server configuration files (.conf). This will also generate a StartMultiServer.java file.

     
  2. Compile the html files using Enhydra's XMLC.
    1. From the JDeveloper menu, select Wizards | XMLC Compiler.
    2. On the Selections tab, select the From.html, Greetings.html, NewNode.html and Table.html files.
    3. Click on Compile to create DOM classes for the selected html files.

     
  3. If you are already running a web server on port 9000, you will first need to modify the following entry in the project's multiserver.conf file to use an available port.
    Connection.HttpConnSample.Port = 9000
    
  4. Start Enhydra MultiServer by selecting the StartMultiServer.java file and pressing F9.
     
  5. From a web browser, enter http://localhost:9000

Sample Pages

The Files
org/enhydra/kelp/sample/KelpSample.conf.in
   Configuration template for the sample servlet.

org/enhyara/kelp/sample/multiserver.conf.in
   Configuration template for the multi-server.

data/formdata.properties
   Data store for the Form page.

org/enhydra/kelp/sample/resources/Form.html
   XMLC template for Form page.

org/enhydra/kelp/sample/resources/Greeting.html
   XMLC template for Greeting page.

org/enhydra/kelp/sample/resources/NewNode.html
   XMLC template for New Node page.

org/enhydra/kelp/sample/resources/Table.html
   XMLC template for Table page.

org/enhydra/kelp/sample/presentation/Form.java
   Java class that processes requests for Form.po

org/enhydra/kelp/sample/presentation/Greeting.java
   Java class that processes requests for Greeting.po

org/enhydra/kelp/sample/presentation/NewNode.java
   Java class that processes requests for NewNode.po

org/enhydra/kelp/sample/presentation/Table.java
   Java class that processes requests for Table.po

text/addme.txt
   HTML span that is added to the New Node page at runtime.

KelpSample.html
   This file which is not an XMLC template.

KelpSample.java
   The servlet controlling class.

StartMultiServer.java
   A utlity class for launching the multiserver from within a Java IDE.