Preparing Enhydra to use Barracuda
- Copy
barracuda.jar, barrtacuda-core.jar and log4j-1.2.4.jar to Enhydra_root\lib
- Copy
barracuda-ant.jar to Enhydra_root\build
- Run
configure from Enhydra root directory
Compiling and using Barracuda HelloWorld1 example with Enhydra
- Make
the following directory structure (use appwizard, delete the default java
and html files, and put the new ones)

- Copy
the Barracuda HelloWorld1.java to presentation folder. Edit the original
file:
- Comment
the following lines:
//package
org.enhydra.barracuda.tutorials.comp;
//import
org.enhydra.barracuda.tutorials.xmlc.*;
- Modify
the following line:
XMLObject page =
xmlcFactory.create(HelloWorld1HTML.class);
To:
XMLObject page =
xmlcFactory.create(barr3.presentation.HelloWorld1HTML.class);
- Copy
the Barracuda HelloWorld1.html to the resources folder
- Create
a new web.xml in the WEB-INF folder:
<web-app>
<servlet>
<servlet-name>
HelloWorld1
</servlet-name>
<servlet-class>
HelloWorld1
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
HelloWorld1
</servlet-name>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
</web-app>
- Run
ant in the application root directory (barr3)
- To
start the new application as a standalone application, change directory to
output and issue run, then connect to url http://localhost:8002/HelloWorld1.
You should be able to see the text of HelloWorld1 example.
- To
start the application from multiserver:
- Copy
classes folder to output\content\WEB-INF
- Connect
to Enhydra Multiserver Administration Console, and add a new war
application:

- Create
a new connection, start it and connect to it
- To
start the application from Tomcat 4 Servlet container:
- Make
a directory barr3 under the Tomcat’s webapps folder
- Unpack
the barr3.war from output/lib directory to this folder.
- If
necessary, make a lib folder under barr3/ WEB-INF and copy barracuda.jar
and log4j-1.2.4.jar to it. Start the servlet container and connect to http://localhost:8080/barr3