File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat as a production servlet container? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat as a production servlet container?" Watch "Tomcat as a production servlet container?" New topic
Author

Tomcat as a production servlet container?

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi all,

Can Tomcat be used as a production servlet container? My application does not have any web pages. It only serves mobile clients so I was thinking of using Tomcat; I don�t think I need Apache Web Server.

Danish
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
You are entirely correct. If you don't need special Apache modules, Tomcat works fine as a general web server. The idea that Apache is needed to efficiently serve web pages is totally bogus IMHO.
Bill
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
In your situation, Bill is correct, I'm just sticking my oar in to disagree (somewhat) with


The idea that Apache is needed to efficiently serve web pages is totally bogus IMHO




Although the statement is correct, tomcat can efficiently serve up webpages, there are other considerations as to why you want to use apache with mod_jk2 in front of tomcat.

The two most important (imo)
a) Privilege separation, you must be root (unix, on windows any user can) to listen on ports <1024. If your tomcat is incorrectly setup, then any compromise allows super-user rights (I've seen tomcat running as root that allow file uploads to arbitary locations...). Apache does start off as root, but services any request as a non-privileged user which lessens this risk.

b) Running other types of website. If all you're doing is java then fair enough, but I like knocking up the odd website using php or perl...

L


I have no java certifications. This makes me a bad programmer. Ignore my post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat as a production servlet container?