aspose file tools*
The moose likes Tomcat and the fly likes Problen in starting Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problen in starting Tomcat" Watch "Problen in starting Tomcat" New topic
Author

Problen in starting Tomcat

lakshmi mocherla
Greenhorn

Joined: Mar 01, 2004
Posts: 2
Hello friends,
I am using Redhat Linux 9.I installed tomcat4.1.27.To run the tomcat i used startup.sh command in the command prompt.There it is showing tomcat as started,but the problem is arising when i am trying to run it using a browser.I am using Mozilla.In the browser when i am typing http://localhost:8080, its saying "The connection was refused when attempting to contact localhost:8080".I even tried changing port numbers and with catalina.sh.Its the same error for everything.When i am trying to shutdown using shutdown.sh its giving the following error

its giving an SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer
at java.net.URLClassLoader.findClass(URLClassLoader.java:341)
at java.lang.ClassLoader.loadClass(ClassLoader.java:552)
at java.lang.ClassLoader.loadClass(ClassLoader.java:484)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252)

I am unable to locate where the error could be.Kindly help me out.
thanks in advance
lakshmi
N Nanda
Ranch Hand

Joined: Feb 09, 2004
Posts: 62
You have not mentioned how did you install tomcat, because as far as i know u don't need to install it as you might be doing in Windows. Anyway, I hope following steps'll help you (I assume you have downloaded the .tar file for the tomcat and configured java1.3 or higher on your machine)...
1. Create a folder tomcat4 under /usr/ folder and extract the .tar file in that folder.
2. Check out whether you have logs folder among the extracted folders. If you won't find, better create it. Anyhow your tomcat installation directory must have following folders and files...
/usr/tomcat4/bin/
/usr/tomcat4/common/
/usr/tomcat4/conf/
/usr/tomcat4/server/
/usr/tomcat4/webapps/
/usr/tomcat4/work/
/usr/tomcat4/LISENCE
/usr/tomcat4/RELEASE-NOTES
/usr/tomcat4/RUNNING.TXT
3. Now you have to set your profile by editing either...
.bash_profile (for any user except root)
/etc/profile (for root user)
Edit the file in any editor and enter followings in it.
JAVA_HOME=/usr/java/j2sdk1.4.2_03 (this is the case in my machine, you may set your own java home directory)
CATALINA_HOME=/usr/tomcat4
CLASSPATH=.:/usr/tomcat4/cpmmon/lib/servlet.jar
and add these variables at the end of the line containing export like..
export <previous_entry> JAVA_HOME CATALINA_HOME CLASSPATH
Note: Though you have set those profiles for root (by editing /etc/profile), you still have to set it for all other users of your machine (by editing .bash_profile for each such user)
3. Now logout and relogin to make those changes reflect properly.
4. Now login as root and start the tomcat by following commands...
> cd /usr/tomcat4/bin
> ./startup.sh

You'll get some messages and command prompt is returned to you. If not check out your settings. To test whether tomcat is working open a web browser and in address type http://localhost:8080. If you'll get the default page, then its working well.
Hope this long documentation helped you. For better result i would recomend new Tomcat5.0. The configuration is same but the output'll be more. A lot of bugs have been fixed in latest version.
Visit My Home Page At... http://sit.iitkgp.ernet.in/~nnanda
or Mail Me At... Niranjan.Nanda@sit.iitkgp.ernet.in


Regards<br />--<br />Niranjan Nanda<br />Consultant<br />Capgemini Consulting India <br />Mumbai<br />Phone: 9324951476
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problen in starting Tomcat