tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Brittain <>
Subject [PATCH] TC4: TomcatBlock on Avalon 3.1a1: Part 1
Date Fri, 09 Feb 2001 23:14:49 GMT

Hi guys.

I've just finished a bunch of changes to make Tomcat 4 (Catalina and
Jasper) work on top of Avalon 3.1a1.

Remy: Thanks for CatalinaBlock -- it served as a good starting point!

What I've done is made the necessary modifications to make Tomcat 4
build as a single Avalon .bar (Block ARchive) file that when deployed
into Avalon auto-deploys its own files and directories from the bar
file to the filesystem where Catalina and Jasper can use them.

Some of my goals that are now done:

1) Make Tomcat 4 deployable as a single .bar file.
2) Make Catalina log through Avalon's LogKit package.
3) Make Jasper work so that JSPs also work (this was tough as it
  turned out).
4) Make Tomcat's build system able to build the .bar file.
5) Only patch Catalina's code where absolutely necessary, and then
  only make patches that are sure not to disturb stand-alone behavior.

In the process, I decided that the name of the block should really be
TomcatBlock, not CatalinaBlock, since the block contains Catalina,
Jasper, and the demo/test webapps.  Let me know if you don't agree.
So, I've replaced CatalinaBlock with TomcatBlock, which is based on
CatalinaBlock but is heavily modified.

In order to make Catalina log through Avalon, I rewrote the
AccessLogValve so that we now have FileAccessLogValve and
AvalonAccessLogValve which are both subclasses of AccessLogValveBase.
I also added org.apache.catalina.logger.AvalonFileLogger so that the
other logs can also log through Avalon.

I modified the main build.xml file and also Catalina's build.xml file
so that from the top-level you can do:

./ dist


./ dist-opt-avalon

in order to build  I moved that target out of
Catalina's build.xml file because it needs to include more than just
Catalina.  So now it resides in the top-level build.xml file, and its
behavior is quite a bit different.

At first, Catalina ran fine this way, but Jasper didn't.  I narrowed
the problem down to the fact that Jasper needs tools.jar on its
classpath, and that it wasn't finding it.  In order to fix the
problem, I had to make a small patch to the Bootstrap class.  I'll go
into more detail about that in one of my next mails (including the

What changed overall?

Files removed:

Files patched:

Files added:

After all of these changes I made, Tomcat 4 still builds and runs
stand-alone the same as it did before (as far as I can tell by my
somewhat limited testing) and it runs as an Avalon 3.1a1 Block.

I know this is a bunch of new code, but I think I've tested and
documented it enough to make it clear and easy commit.

My next mails will include the diffs and the new source.

Jason Brittain
Software Engineer, Olliance Inc.
Current Maintainer, Locomotive Project

View raw message