Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes Question for Matthew Moodie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Question for Matthew Moodie" Watch "Question for Matthew Moodie" New topic
Author

Question for Matthew Moodie

chris coleman
Ranch Hand

Joined: Mar 06, 2002
Posts: 42
Hey Matthew,

So it looks like you're good at Tomcat..?

Here are two question for you !

Does your book offer a guide on painlessly upgrading from TOmcat 4 to 5 on multiple platforms..?? (linux, windows, solaris, etc... )

And does your book have a troubleshooting guide, for example, what do you do when tomcat processes JSP's on one virtual host, and NOT on another virtual host ???


Sun Certified Java Programmer for the Java2(tm) Platform<br />IBM Certified Solution Developer, WebSphere 3.5
Matthew Moodie
author
Greenhorn

Joined: Oct 18, 2002
Posts: 14
Hi,

No, the book does not discuss the upgrading process.

There are troubleshooting sections throughout the book, though the virtual hosting chapter doesn't discuss the specific problem you mention. Is this a problem you are having just now?

Matt


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1590593316/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Tomcat 5</a>
chris coleman
Ranch Hand

Joined: Mar 06, 2002
Posts: 42
Yes Matthew it is a problem right now, running on Tomcat 4.1.27

Details:

One of the apache virtualhosts is sending JSP's to tomcat for processing, and the JSP's are running as they are supposed to.

The other virtual host: when I put the same line in the virtual host section of apache's httpd.conf for this host (the line is "JkMount /*.jsp ajp13"), tomcat is activated, but for ANY AND ALL jsp's, it shows ONLY the tomcat welcome page ?! "If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!" And all the images on this welcome page are broken ?!

How do you cure this problem ??

Do you have an idea, a solution, or a troubleshooting procedure ??
Matthew Moodie
author
Greenhorn

Joined: Oct 18, 2002
Posts: 14
Hi,

In this case, are you using the same Tomcat instance to serve both Apache virtual hosts or are there two instances of Tomcat running?

Also, do you have virtual hosting set up on Tomcat as well as Apache? This is required if you are using more than one host with an Apache/Tomcat setup.

Matt
chris coleman
Ranch Hand

Joined: Mar 06, 2002
Posts: 42
1. There is only one instance of TOmcat running... in other words, only one JVM process is running Tomcat..

2. I have not setup virtual hosting in Tomcat, so obviously this is where I will look first.

DOes your book have a section on How to setup virtual hosting in TOmcat ??

Are Tomcat 4 and Tomcat 5 the same when it comes to setting up virtual hosting ??

[ March 03, 2005: Message edited by: chris coleman ]
[ March 03, 2005: Message edited by: chris coleman ]
Matthew Moodie
author
Greenhorn

Joined: Oct 18, 2002
Posts: 14
Hi,

Yes, I would start by trying virtual hosting on Tomcat. If there is only one virtual machine running both hosts, then configure another host in server.xml.

The book does have a chapter on virtual hosting on Tomcat 5, though for a quick intro to Tomcat 4, the docs are fine:

Tomcat 4 Host Config

Replicate all the context information in this host.

Matt
chris coleman
Ranch Hand

Joined: Mar 06, 2002
Posts: 42
Matthew, that was it.

I manually copied a new <Host> tag into the correct spot in server.xml and set its parameter values to correspond to that particular apache virtual host, and now Tomcat 4.1.27 is correctly running JSP code.

Thanks mate.

I will upgrade to Tomcat 5 when your book arrives...


Chris Coleman
Matthew Moodie
author
Greenhorn

Joined: Oct 18, 2002
Posts: 14
Hi,

Excellent. I'm glad to be of help.

Matt

P.S. Congratulations on the win too.
[ March 07, 2005: Message edited by: Matthew Moodie ]
 
 
subject: Question for Matthew Moodie