integrating java into Apache

integrating java into Apache

Post by Ashley Swi » Wed, 30 Jun 2004 05:00:30

I want to incorporate a java compression algorithm onto a Web page at the
server and decode/display the page on the client. How do I integrate Java
into the Apache server? I don't know where to start.

integrating java into Apache

Post by Jim Patter » Mon, 05 Jul 2004 13:20:12

There are a couple of ways you can go:

- Use JNI (Java Native Interface) to call the Java functionality when
you need it. It's likely best to wrap this in an Apache module, since if
you just use a CGI the Java startup per web page would likely negate the
benefits of compressing. There is information on JNI at the Java
website ( ), or in the JDK documentation.

- Put the code into an applet, and link it to your web server using a
connector (see ).
You can use Tomcat from Apache (which is where this page points), or
some other JSP host.

Both of these will take a fair amount of coding and "learning curve" to
get up and running.

If you're willing to use something other than Apache as the web server,
you can also use the web server in a JSP container like Tomcat directly.
Since you're generating the pages in Java already, this may well be more

Jim Patterson
Ottawa, CANADA