Two hosts setup, jsp won't work!

2004-06-01 Thread Nadia Kunkov
Hi,

I run Tomcat5.0.24 on Fedora Core 1.  I have two hosts defined in server.xml in a 
following way:

Host name =WebTest1.something.com debug=0 appBase=webapps  unpackWARs=true
 autoDeploy=true xmlValidation=false 
lNamespaceAware=false
Context path= docBase=WebTest1 debug=5/
   
  
Logger 
className=org.apache.catalina.logger.FileLogger
prefix=localhost_WebTest1_log. suffix=.txt
timestamp=true/ 
   
 
/Host
   
  
Host name =WebTest2.something.com debug=0  
appBase=webapps unpackWARs=true
 autoDeploy=true xmlValidation=false xmlNamespaceAware=false
 
Context path=/WebTest2 docBase=WebTest2 debug=0 
reloadable=true/

Logger 
className=org.apache.catalina.logger.FileLogger
prefix=localhost_WebTest2_log. suffix=.txt
timestamp=true/
   
  
/Host

I have proper DNS entries on my DNS server for both hosts.
First host is a simple http website and a second host is a jsp website.
I'm able to access both sites but when I run the jsp application ( WebTest2) I'm able 
to go through some jsp pages and then I get an error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

/var/tomcat5/work/Catalina/WebTest2.something.com/WebTest2/org/apache/jsp/someJsp_jsp.java:15:
 package com.crystaldecisions.sdk.occa.report does not exist
import com.crystaldecisions.sdk.occa.report.*;
^
1 error

I have about 5 jar files containing com.crystaldecisions.sdk.occa.report.* in
/var/tomcat5/webapps/WebTest2/WEB-INF/lib 

I copied the above jars to /var/tomcat5/webapps/WebTest2/WEB-INF/classes just in case 
and got the same error.
Does this have anything to do with the hosts I've defined?  Did I create a wrong 
directory structure?
My jsps are in  /var/tomcat5/webapps/WebTest2
Everything below /var/tomcat5/webapps is owned by tomcat5 user.  My Tomcat is running 
as root since I need it to be listening on port 80.  Cat it be a permissions problem?

Any help would be appreciated.
Thanks in advance
N.K.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two hosts setup, jsp won't work!

2004-06-01 Thread QM
On Tue, Jun 01, 2004 at 11:48:45AM -0400, Nadia Kunkov wrote:
: I run Tomcat5.0.24 on Fedora Core 1.  I have two hosts defined in server.xml
: in a following way:

First things first -- if you're going to use multiple virtual hosts, you'd
do well to either 1/ use separate appBase dirs, or 2/ disable autoDeploy
and deployOnStartup for your Host elements.

Otherwise, each vhost will deploy both webapps when it starts.



: I have about 5 jar files containing com.crystaldecisions.sdk.occa.report.* in
: /var/tomcat5/webapps/WebTest2/WEB-INF/lib

Are all of the classes unique between the jars? (That is, are there any
classes defined in multiple jars?)  If not, things could get messy down the
line.

To start debugging, you could disable the vhost for WebTest1 (just comment
it out) and focus on WebTest2.

Then, pare down the list of jarfiles in WebTest2/WEB-INF/lib.  Confirm that
each jar is indeed a valid file (a quick jar -tf {file} should do) and
that the required class, and every class on which it depends, is available
either in a JAR in WebTest2/WEB-INF/lib or a bare class in
WebTest2/WEB-INF/classes.



: I copied the above jars to /var/tomcat5/webapps/WebTest2/WEB-INF/classes just
: in case and got the same error.

No need to do this -- WEB-INF/classes will only load bare class files;
jarfiles must exist in WEB-INF/lib.


: Does this have anything to do with the hosts I've defined?  Did I create a
: wrong directory structure?

The dirs look OK.  If other JSPs compile without a problem, you can pretty
much narrow it down to a missing/rogue jarfile or class.



: Everything below /var/tomcat5/webapps is owned by tomcat5 user.  My Tomcat is
: running as root since I need it to be listening on port 80.  Cat it be a
: permissions problem?

Probably not a permissions problem, but you probably don't want root
running the Tomcat process.  

Once you've solved  your immediate JSP problem, you may want to look into
commons-daemon/jsvc.  (This was discussed recently on the list; see the
archives for details.)


-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Two hosts setup, jsp won't work!

2004-06-01 Thread Nadia Kunkov
Thanks for your advise.  I did what you said.  The jars have unique classes.  Also the 
exact same application works on my other machine (exact jars and everything else), but 
the other machine runs Red Hat 9 and Tomcat 4.X.X   and here I'm trying to install 
this app on Fedora Core 1 and Tomcat 5.0.24
I commented out both hosts to run the app on localhost:8080 and it gave me the same 
error...  I'm at a loss...
Any ideas?
Thanks for the help.
N.K.



-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 01, 2004 12:19 PM
To: Tomcat Users List
Subject: Re: Two hosts setup, jsp won't work!


On Tue, Jun 01, 2004 at 11:48:45AM -0400, Nadia Kunkov wrote:
: I run Tomcat5.0.24 on Fedora Core 1.  I have two hosts defined in server.xml
: in a following way:

First things first -- if you're going to use multiple virtual hosts, you'd
do well to either 1/ use separate appBase dirs, or 2/ disable autoDeploy
and deployOnStartup for your Host elements.

Otherwise, each vhost will deploy both webapps when it starts.



: I have about 5 jar files containing com.crystaldecisions.sdk.occa.report.* in
: /var/tomcat5/webapps/WebTest2/WEB-INF/lib

Are all of the classes unique between the jars? (That is, are there any
classes defined in multiple jars?)  If not, things could get messy down the
line.

To start debugging, you could disable the vhost for WebTest1 (just comment
it out) and focus on WebTest2.

Then, pare down the list of jarfiles in WebTest2/WEB-INF/lib.  Confirm that
each jar is indeed a valid file (a quick jar -tf {file} should do) and
that the required class, and every class on which it depends, is available
either in a JAR in WebTest2/WEB-INF/lib or a bare class in
WebTest2/WEB-INF/classes.



: I copied the above jars to /var/tomcat5/webapps/WebTest2/WEB-INF/classes just
: in case and got the same error.

No need to do this -- WEB-INF/classes will only load bare class files;
jarfiles must exist in WEB-INF/lib.


: Does this have anything to do with the hosts I've defined?  Did I create a
: wrong directory structure?

The dirs look OK.  If other JSPs compile without a problem, you can pretty
much narrow it down to a missing/rogue jarfile or class.



: Everything below /var/tomcat5/webapps is owned by tomcat5 user.  My Tomcat is
: running as root since I need it to be listening on port 80.  Cat it be a
: permissions problem?

Probably not a permissions problem, but you probably don't want root
running the Tomcat process.  

Once you've solved  your immediate JSP problem, you may want to look into
commons-daemon/jsvc.  (This was discussed recently on the list; see the
archives for details.)


-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]