Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integration of Tomcat and Apache

Status
Not open for further replies.

pisth

Programmer
Mar 18, 2003
43
US
Hell0,
I have a program installed which requires Apache server to run. The program runs perfect on the apache server.

However I had to add additional functionality to the program and hence wrote a peice of code in JSP and hence needed Tomcat to execute the same.

When I run the JSP program, it must inturn call the program in apache and produce the output.

Hence I need to make the apache and tomcat server compatible with each other so that when i run the JSP page in the tomcat server, it inturn calls the program running in the apache server and produces the output.

Can anyone suggest me a way to do this?. I tried doing the same with mod_jk modules etc, however I got lost in the middle because i am pretty new to Apache and Tomcat.

Hoping for a reply.

Thanks!

Karthik.
 
I have a quite naive question regarding Tomcat and Apache: is it necessary to use Apache if I use Tomcat 4.1.24, which can support web application itself? Why do we need to run Apache as well as Tomcat?
 
Well. I atleast know the answer to this question i guess as itz a requirement for me. :)

anyways...i am building a jsp application and i am running my jsp on tomcat and using apache as the main web server.

Karthik.
 
Also tomcat is an application server meant for a specific language java/jsp and you may not want it to do other dumb jobs like serving images,handling security,etc which Apache can do.
 
but tomcat 4.1.24 itself can serve as a web server as well, can't it?
 
Yes. Tomca can serve as a web server by itself.
You are correct.
 
so my question is, what are the advantages (like security, concurrency handling etc) to use Apache+Tomcat, instead of Tomcat alone?
 
qixz,

The main advantage of using tomcat behind apache is only really relevant under heavy load.

Firstly, Apache is faster at processing static web pages so it processes those and only passes the jsp and servlet stuff (which is itself more intensive) to tomcat.

Secondly, and more significantly, the combination of the two also facilitates scalability and loadbalancing whereby a single domain on an apache server can be supported by multiple Tomcat servers on different machines.

Using the two together also means that your jsp applications can be accessed via mydomain.com rather than mydomain.com:8080 . If you don't have apache installed, then you can run Tomcat on port 80 (the default) anyway, but if you need both apache and tomcat, linking the two makes it look a bit neater.

Nick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top