views:

445

answers:

2

I'm using ubuntu 9.10 and I installed java and tomcat using the package manager. When I went to run startup.sh, it first complains about catalina.out not being there and not being writable. I fixed that and it doesn't complain about that (why isn't that included in the install??) Now it's complaining about server.xml not being there when I shut down the server. Here is my output from command line:

user@desktop:/usr/share/tomcat6$ ./bin/startup.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-6-sun-1.6.0.15
user@desktop:/usr/share/tomcat6$ ./bin/shutdown.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-6-sun-1.6.0.15
Dec 11, 2009 4:42:57 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: 
java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:407)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
user@desktop:/usr/share/tomcat6$

I'm really new to tomcat so this might be a dumb question, but why isn't there a sample server.xml in a fresh install of tomcat? What can I put in there to shut it up... even if its just a stub and a +1 to any one who can explain to me the structure of this file?

+1  A: 

Try using server.xml located at:

/etc/tomcat6/server.xml

server.xml is the configuration file for the application server. It contains stuff like what port is the server going to listen at, where are the applications being deployed, and other related stuff.

Pablo Santa Cruz
That made it quiet. Thanks!
DJTripleThreat
+1  A: 

More info on Tomcat in Ubuntu:

https://help.ubuntu.com/9.10/serverguide/C/tomcat.html

Nate
Thanks, I will check this page out.
DJTripleThreat