Hi all,
I have downloaded the apache-tomcat-6.0.26-src and unzip into my directory.
Directory:/home/prem/Download/tomcat/apache-tomcat-6.0.26-src.
I am using Red hat machine.


To find where my java installed i use the following command:
which java;
Output:
/usr/bin/java

Environment Variables:
export JAVA_HOME=usr/bin/java
export CATALINA_HOME=/home/prem/Download/tomacat/apache-tomcat-6.0.26-src

When i run the version.sh file in tomcat i received the following error.
[root@localhost bin]# sh version.sh
Using CATALINA_BASE: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src
Using CATALINA_HOME: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src
Using CATALINA_TMPDIR: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src/temp
Using JRE_HOME: /usr/bin/java
Using CLASSPATH: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src/bin/bootstrap.jar
/home/prem/Download/tomcat/apache-tomcat-6.0.26-src/bin/catalina.sh: line 421: /usr/bin/java/bin/java: Not a directory


When i execute the startup.sh i got the below message and tomcat did not started .

[root@localhost bin]# sh startup.sh
Using CATALINA_BASE: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src
Using CATALINA_HOME: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src
Using CATALINA_TMPDIR: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src/temp
Using JRE_HOME: /usr/bin/
Using CLASSPATH: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src/bin/bootstrap.jar
touch: cannot touch `/home/prem/Download/tomcat/apache-tomcat-6.0.26-src/logs/catalina.out': No such file or directory
/home/prem/Download/tomcat/apache-tomcat-6.0.26-src/bin/catalina.sh: line 332: /home/prem/Download/tomcat/apache-tomcat-6.0.26-src/logs/catalina.out: No such file or directory


If any one familliar with tomcat please help me out and solve this problem earlier i am working for past one days to solve this one..

Thank you,


With Regards,
Prem.M

If you are coding locally (I.e not for production but coding) I would prefer bundled server. I use Netbeans bundled with Tomcat (NB JEE edition).
Try that if you want. I can start, stop and do many things from NB

Hi,
Sorry, i need to use only apache-tomcat server.If anybody know the installation step of tomcat server in linux guide me.

Thank you,
Prem

I wonder why did you downloaded Developer package instead of core???
Here are steps for Windows XP and Ubuntu installation or perhaps this tutorial

Hi,
Thanks for your reply .
Now, i installed tomcat successfully in my linux system using the yum command.
when i type http://localhost:8080/.The tomcat open page is displaying successfully.
I want to execute the servlet program in my system.
So,i download the sample servlet program in the below site
http://articles.sitepoint.com/article/java-servlets-1/2


I have deployed the class files in WEB-INF/classes/.
But i do no how to execute it in the url.If you know please tell me some basic steps.

I will provide the web.xml file for your reference.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      [url]http://www.apache.org/licenses/LICENSE-2.0[/url]

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5">

  <display-name>Welcome to Tomcat</display-name>
  <description>
     Welcome to Tomcat
  </description>
<servlet>
<servlet-name>My</servlet-name>
<servlet-class>MyServlet-class</servlet-class>
</servlet>
</web-app>

Thank you,

With Regards,
Prem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.