Normal users can't control Tomcat server. If you want to start/restart/shutdown Tomcat, you must use "sudo". For developers, restarting Tomcat is very frequent, therefore, typing "sudo" again and again becomes a dirty work.
Problems about MySQL connection. The default bootstrap of Tomcat is /etc/init.d/tomcat5.5 and it starts Tomcat server automatically. But the serious problem is: Tomcat con't connect to MySQL database! I don't know why. However, if I start Tomcat with /usr/share/tomcat5.5/bin/startup.sh, Tomcat can connect to MySQL. Why the two methods to start Tomcat are different?
Class loading problems. I wrote my first servlet that can connect MySQL with JDBC and found some strange problems. I create three files:
- Database.java: the database class, which encapsulates some database operations;
- DBTestServlet.java: the servlet class that calls Database class to operate database.
I don't know why Ubuntu's Tomcat package has so many problems. Perhaps the best solution is to download Tomcat from http://tomcat.apache.org/ and extract it to a directory instead of using "sudo apt-get install tomcat5.5".
1 comment:
You're using 8.10 which isn't released yet, so my guess is that you're trying to use the new Tomcat 6 which is included in the new release.
I'd have a look at this blog post to see if it solves your problem:
http://ubuntuserver.wordpress.com/2008/09/01/tomcat-6-lands-in-intrepid/
If you still think it's a problem report the specific problems on the package:
https://bugs.edge.launchpad.net/ubuntu/+source/tomcat6
Post a Comment