You shouldn't have any problems getting Apache and Tomcat to work as you
described. You should be able to access your static HTML content by
browsing to
http://localhost and your servlets/JSPs by browsing to
http://localhost:8080. And once you get Apache talking to Tomcat (with
mod_jk or one of its cousins), you can access your servlets by browsing to
http://localhost/servlets.
Although you didn't ask for it, I can describe some of my experience trying
to set up Tomcat with Apache. :) Basically I used an article I found at
Linux Journal (
http://www.linuxjournal.com/article.php?sid=4576). Once I
figured out that Apache 2.0.x is different than Apache 1.3.x, and Tomcat
4.0.x is different than Tomcat 3.2.x, and that the documentation isn't as
up-to-date as the software, I was able to follow this article and get Apache
1.3.24 serving static HTML content and passing servlet/JSP requests over to
Tomcat 3.2.4 via mod_jk on a RedHat Linux 7.3 box. Before I figured out
those differences, I wasted a couple weeks trying to figure out why Tomcat
4.0.x wasn't generating a mod_jk.conf-auto like all the docs said it should,
or why Apache 2.0.x didn't seem to be loading the mod_jk module, or why
Apache just didn't seem to understand what to do with incoming requests for
a .jsp page even though I TOLD it what to do, etc., etc. I still have not
been able to find any (good) documentation describing how to set up Apache
2.0.x with mod_jk and Tomcat 4.0.x. I did find an article
(
http://dcb.sun.com/practices/howtos/tomcat_apache.jsp) which describes how
to get Apache talking to Tomcat 4.0.x with mod_webapp, but I failed to get
that working either, for reasons I can't recall. I guess the good thing is
that, as a result of struggling for two weeks to get this working, I gained
a pretty good understanding of the workers.properties, server.xml,
mod_jk.conf-auto, httpd.conf and web.xml files.
Now if I could just figure out how to get the <SERVLET> tag to work in SSI
pages (without using the obviously preferable method of converting those SSI
pages to JSPs)....
Good luck,
~Jeff
On Monday, June 17, 2002 4:11 PM, Alpha Zenon Sanchez wrote:
> Hello Linux Users:
>
>
> 1. I wanted to play around (test develop and teach
> myself)
> some Java Servlets Programming **Locally Without**
> having to configure Apache
> and Linux to work as a Network server. Is this
> possible?
>
> 2. Can Apache serve .html pages and .jsp pages to a
> local computer even if it is not
> configured to be on the network? My idea is to use
> the computer's loopback address
> to emulate a 'network' setting for Apache, my
> computer and the browswer. Is this
> possible?
>
> 3. If not possible, am i stuck to learn Samba and need
> a 'true' client/server environment
> with a server and a workstation to develop .jsp
> pages?
>
> I plan to use Apache, Jakarta Tomcat and MySQL for
> testing and learning.
> I'm currently using Redhat 7.2 and KDE as a desktop
> environment.