Karl-

check .profile and .bashrc for any manipulations of JAVA_HOME or CATALINA_HOME 
or CATALINA_BASE
have you noticed any specific errors in either the logs or stacktrace?

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






Date: Sun, 24 Apr 2011 11:06:25 +0200
Subject: Re: Problems deploying a servlet on ubuntu
From: karlschmitt1...@googlemail.com
To: users@tomcat.apache.org

Thanks Andre,

for answering my call for help,
I tried to answer you questions as best as I could below: 

Tomcat was installed using the synaptic packet management
I just ticked tomcat6 and hit the apply button, and tomcat and all its 
dependencies

were installed and http://locaclhost:8080 started to work,
that was the easy part :-) 

karl@sonoma:/usr/share/tomcat6/bin$ ./version.sh
Using CATALINA_BASE:   /usr/share/tomcat6

Using CATALINA_HOME:   /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk
Using CLASSPATH:       /usr/share/tomcat6/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.24

Server built:   March 24 2011 1829
Server number:  ...0
OS Name:        Linux
OS Version:     2.6.32-31-generic
Architecture:   i386
JVM Version:    1.6.0_20-b20
JVM Vendor:     Sun Microsystems Inc.

karl@sonoma:/usr/share/tomcat6/bin$ 

karl@sonoma:/usr/share/tomcat6/bin$ echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk

karl@sonoma:/usr/share/tomcat6/bin$ java -version
java version "1.6.0_20"

OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)

My web.xml is located here:
karl@sonoma:/usr/share/tomcat6/webapps/ch1/WEB-INF$ ls

classes  web.xml

My servlet is located here:
karl@sonoma:/usr/share/tomcat6/webapps/ch1/WEB-INF/classes$ ls
Ch1Servlet.class

karl@sonoma:/etc/tomcat6$ ls
Catalina             context.xml         policy.d    tomcat-users.xml

catalina.properties  logging.properties  server.xml  web.xml
karl@sonoma:/etc/tomcat6$ 

---------------------------------------------------------------
My grep for "host" in server.xml:

karl@sonoma:/etc/tomcat6$ grep -A 5 "[Hh]ost" server.xml 

         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         

    --> 
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)

          /docs/config/cluster.html (reference documentation) -->
      <!--
--
      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true" deployOnStartup="true"
            xmlValidation="false" xmlNamespaceAware="false">


        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
--
               prefix="localhost_access_log." suffix=".txt" pattern="common" 
resolveHosts="false"/>

        -->

      </Host>
    </Engine>
  </Service>
</Server>
karl@sonoma:/etc/tomcat6$ 
------------------------------------------------------------------------------------


here I will try to attach the whole server.xml file:




On Sat, Apr 23, 2011 at 11:41 AM, André Warnier <a...@ice-sa.com> wrote:



Sorry, but I don't know the book.

So maybe you can tell us some more :

- how did you install Tomcat ? where did you get it ?

- what version is it ?

(go to the "bin" directory of tomcat, and run "./version.sh"; paste the result 
here)(*)

- what version is the JVM ?  ("java -version" may tell you, if the above 
doesn't)

- can you give us the exact paths where you installed your servlet files ? (the 
servlet itself and the web.xml file)

- in the Tomcat "conf" directory (in your case, it may be in /etc/tomcatxx), 
there is a file "server.xml". In that file, is a <Host> tag, which gives the 
path for the webapps directory (in the "appBase" attribute). Which is that ?






(*) if this is a "packaged" tomcat, this may complain that JAVA_HOME is not 
set.  If so, you first have to locate what JAVA_HOME should be set to.  Look 
then in /etc/init.d/tomcatxx to find out.



---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org                   
                  

Reply via email to