tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Schmitt <karlschmitt1...@googlemail.com>
Subject Re: Problems deploying a servlet on ubuntu
Date Sun, 01 May 2011 08:37:05 GMT
Hi folks, Hi David,

I use the /var/lib/tomcat6/webapps directory now,
http://localhost:8080 is working
and http://localhost:8080/ch1/Serv1 is still not working
even after restarting tomcat6 or the whole machine :-(

here comes a recursive listing of the directory structure:

karl@sonoma:/var/lib/tomcat6/webapps$ ls -LRltr
.:
insgesamt 8
drwxr-xr-x 3 root root 4096 2011-04-17 09:12 ROOT
drwxr-xr-x 3 root root 4096 2011-04-22 12:51 ch1

./ROOT:
insgesamt 8
drwxr-xr-x 2 root root 4096 2011-04-17 09:12 META-INF
-rw-r--r-- 1 root root 1887 2011-04-17 09:12 index.html

./ROOT/META-INF:
insgesamt 4
-rw-r--r-- 1 root root 51 2011-04-17 09:12 context.xml

./ch1:
insgesamt 4
drwxr-xr-x 3 root root 4096 2011-04-22 12:51 WEB-INF

./ch1/WEB-INF:
insgesamt 8
-rw-r--r-- 1 karl karl  312 2011-04-22 12:44 web.xml
drwxr-xr-x 2 root root 4096 2011-04-22 12:51 classes

./ch1/WEB-INF/classes:
insgesamt 4
-rw-r--r-- 1 karl karl 931 2011-04-22 12:13 Ch1Servlet.class
karl@sonoma:/var/lib/tomcat6/webapps$

Yours,
Karl

On Mon, Apr 25, 2011 at 2:52 PM, David Smith <david.smith@cornell.edu>wrote:

> Hi Karl.
>
> The tomcat service set's it's own JAVA_HOME and CATALINA_HOME
> environment variables.  Just a quick look in /etc/init.d/tomcat6 will
> show that.
>
> My installation of tomcat 6 on Ubuntu has webapps deployed to
> /var/lib/tomcat6/webapps, not /usr/share/tomcat6/webapps.  The later
> directory doesn't even exist.  Could you take a look at
> /var/lib/tomcat6/webapps?  The ROOT webapp should be there.  Put your
> webapp next to it and make sure it's readable by the tomcat6 user
> account .. either by setting world readable or make sure tomcat6 is in
> the group or owner permission fields.  Once all that is done, restart
> tomcat6:
>
> sudo service tomcat6 restart
>
> --David
>
> On 4/25/2011 5:36 AM, Karl Schmitt wrote:
> > Dear Marin,
> >
> > thanks for your reply :-)
> >
> > please verify is one of those environment variable
> > pointing to the wrong place?
> >
> > karl@sonoma:~$ sudo -s
> > [sudo] password for karl:
> > root@sonoma:~# echo $JAVA_HOME
> > /usr/lib/jvm/java-1.6.0-openjdk
> > root@sonoma:~# echo $CATALINA_HOME
> > /usr/share/tomcat6
> > root@sonoma:~# echo $CATALINA_BASE
> > /usr/share/tomcat6
> > root@sonoma:~#
> >
> > I do have an error logged in the out file, however, no clue what it means
> > :-(
> >
> > root@sonoma:/var/log/tomcat6# egrep "[Ee]rror" *.log; egrep "[Ee]rror"
> *.out
> > java.util.logging.ErrorManager: 1: FileHandler is closed or not yet
> > initialized, unable to log [22.04.2011 21:45:57
> > org.apache.coyote.http11.Http11Protocol pause
> > root@sonoma:/var/log/tomcat6#
> >
> > Thanks in advance,
> > Karl
> >
> >
> >
> > On Sun, Apr 24, 2011 at 2:47 PM, Martin Gainty <mgainty@hotmail.com>
> wrote:
> >
> >> 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: karlschmitt1969@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 <aw@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-unsubscribe@tomcat.apache.org
> >>
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message