> I'm just curious, in previous companies I've worked with, the architecture
> is always jboss/tomcat, mod_jk and apache (or IIS). If I'm not serving up
> any non jboss static html, do i really need a webserver beyond tomcat?
Nope, you don't need a web server. Tomcat is perfectly capable of
serving HTTP. The need for Apache can arise from:
1. Performance. If a high portion of the content is static, then it is
likley to be faster to let Apache serve that content rather than Tomcat.
However, be careful about doing this for performance reasons if in fact
most of the content is dynamic, as it can be slower instead.
2. Flexibility. There exist a large number of extensions to Apache that
provide flexibility that's not available in Tomcat. For example, you
could use mod_rewrite to play all sorts of nasty tricks.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
RobR - 03 Dec 2005 20:28 GMT
>> I'm just curious, in previous companies I've worked with, the
>> architecture
[quoted text clipped - 13 lines]
> provide flexibility that's not available in Tomcat. For example, you
> could use mod_rewrite to play all sorts of nasty tricks.
Thanks for the quick response, I appreciate the info. The application
is using AJAX and is almost entirely dynamic so this is great news.
I finally got it working with IIS yesterday. I was so intent on the fact
that 'this is the way it's always been done', I didn't stop to ask myself
WHY. There is one other thing I just thought about though.... eventually
we will incorporate credit card transactions and will need do deal with
SSL certs. I'll have to read up to see if Tomcat can deal with that, but
it's not something I need to worry about for the next few months.
Chris Smith - 03 Dec 2005 21:05 GMT
> Thanks for the quick response, I appreciate the info. The application
> is using AJAX and is almost entirely dynamic so this is great news.
[quoted text clipped - 4 lines]
> SSL certs. I'll have to read up to see if Tomcat can deal with that, but
> it's not something I need to worry about for the next few months.
It works fine. Design-a-Course (from my signature, the product I
maintain for a living) runs on Tomcat under SSL. We've had no problems.
It's a little more of a hassle to update the certificates once they
expire, since you have to generate a new CSR. Overall, though, it's
pretty straight-forward.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Chris Uppal - 04 Dec 2005 13:41 GMT
> 1. Performance. If a high portion of the content is static, then it is
> likley to be faster to let Apache serve that content rather than Tomcat.
Is that something you know from personal experience (or other reputable source)
? I get the impression that Apache is pretty slow. At least, I can't think of
a webserver that doesn't proudly proclaim itself to be "faster than Apache"[*],
so I wonder whether Tomcat is actually slower for static content.
-- chris
([*] Including, IIRC, the very first webserver written in Java, back when only
the interpreter was available. Admitedly they didn't claim it to be /much/
faster, and also had to do quite a lot of performance work on Strings,
StringBuffers, and avoiding unwantedly synchronised methods in general.)
Chris Smith - 04 Dec 2005 15:45 GMT
> Is that something you know from personal experience (or other reputable source)
> ? I get the impression that Apache is pretty slow. At least, I can't think of
> a webserver that doesn't proudly proclaim itself to be "faster than Apache"[*],
> so I wonder whether Tomcat is actually slower for static content.
I'm sure that it depends on context. I've definitely seen Apache (2.0
IIRC) perform faster than Tomcat under very heavy load. The 1.x release
cycle used to suffer from fairly serious performance problems under high
load, though.
I think there are several reasons besides Apache's slowness that
everyone claims to be faster than Apache:
- Apache is the de facto standard web server, running on a fair majority
of servers, so a lot of servers go out of their way to establish
advantages over it.
- Tuning plays a big role in performance of something like Apache.
Proper choice of filesystem and various parameters can be used to make
anything faster than anything else, so it's easy to establish being
faster.
Of course, I'd recommend anyone do some load testing if they are seeing
high enough load to care whether they're getting optimal performance out
of the web server.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation