jdk:sun java 1.5.0_07
1、在http://www.sysdeo.com/eclipse/tomcatplugin下载tomcatpluginv31,这里要注意,虽然eclipse是3.2,但tomcatpluginv31是final版,在主页上并没有说明支持eclipse 3.2,但没有更新的版本,我就用了,事实证明可以用。
2、将tomcatpluginV31解压到eclipse/plugins目录下,出现com.sysdeo.eclipse.tomcat_3.1.0子目录。
3、设置eclipse。选择Window->Preferences,在tomcat分支中,版本选择tomcat5.x,Tomcat home选择tomcat安装路径。在tomcat->advanced分支中,tomcat base设置为tomcat安装路径。在JVM Settings中,Classpath选项右边的Jar/Zip,浏览选择JAVA_HOME/lib/tools.jar,否则不能编译jsp。在Tomcat Manager App输入username和password。
4、从eclipse的工具栏按钮中启动tomcat。得到如下提示:
2006-9-20 21:46:02 org.apache.catalina.startup.Catalina load
警告: Can't load server.xml from /usr/local/apache-tomcat-5.5.17/conf/server.xml
2006-9-20 21:46:03 org.apache.catalina.startup.Catalina load
警告: Can't load server.xml from /usr/local/apache-tomcat-5.5.17/conf/server.xml
2006-9-20 21:46:03 org.apache.catalina.startup.Catalina start
信息: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
... 6 more
5、查看$CATLINA_HOME/conf/server.xml,root用户具有读写权限,其他用户无任何权限,chmod o+r server.xml,添加读权限。
6、再次在工具栏中启动tomcat,得到如下提示。启动成功。注意,受blog字数限制,删除部分内容。
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager stop
严重: Exception unloading sessions to persistent storage
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/_/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig processContextConfig
严重: Missing default web.xml, using application web.xml only conf/context.xml /usr/local/apache-tomcat-5.5.17/conf/context.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/context.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig processContextConfig
严重: Parse error in default web.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/context.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig defaultWebConfig
严重: Missing default web.xml, using application web.xml only conf/web.xml /usr/local/apache-tomcat-5.5.17/conf/web.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/web.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2006-9-20 22:13:18 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2006-9-20 22:13:18 org.apache.catalina.core.StandardContext start
严重: Context [/balancer] startup failed due to previous errors
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager doUnload
严重: IOException while saving persisted sessions: java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager stop
严重: Exception unloading sessions to persistent storage
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at e.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:19 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2006-9-20 22:13:20 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2006-9-20 22:13:20 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/100 config=null
2006-9-20 22:13:20 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2006-9-20 22:13:20 org.apache.catalina.startup.Catalina start
信息: Server startup in 4922 ms
1、在http://www.sysdeo.com/eclipse/tomcatplugin下载tomcatpluginv31,这里要注意,虽然eclipse是3.2,但tomcatpluginv31是final版,在主页上并没有说明支持eclipse 3.2,但没有更新的版本,我就用了,事实证明可以用。
2、将tomcatpluginV31解压到eclipse/plugins目录下,出现com.sysdeo.eclipse.tomcat_3.1.0子目录。
3、设置eclipse。选择Window->Preferences,在tomcat分支中,版本选择tomcat5.x,Tomcat home选择tomcat安装路径。在tomcat->advanced分支中,tomcat base设置为tomcat安装路径。在JVM Settings中,Classpath选项右边的Jar/Zip,浏览选择JAVA_HOME/lib/tools.jar,否则不能编译jsp。在Tomcat Manager App输入username和password。
4、从eclipse的工具栏按钮中启动tomcat。得到如下提示:
2006-9-20 21:46:02 org.apache.catalina.startup.Catalina load
警告: Can't load server.xml from /usr/local/apache-tomcat-5.5.17/conf/server.xml
2006-9-20 21:46:03 org.apache.catalina.startup.Catalina load
警告: Can't load server.xml from /usr/local/apache-tomcat-5.5.17/conf/server.xml
2006-9-20 21:46:03 org.apache.catalina.startup.Catalina start
信息: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
... 6 more
5、查看$CATLINA_HOME/conf/server.xml,root用户具有读写权限,其他用户无任何权限,chmod o+r server.xml,添加读权限。
6、再次在工具栏中启动tomcat,得到如下提示。启动成功。注意,受blog字数限制,删除部分内容。
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager stop
严重: Exception unloading sessions to persistent storage
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/_/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig processContextConfig
严重: Missing default web.xml, using application web.xml only conf/context.xml /usr/local/apache-tomcat-5.5.17/conf/context.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/context.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig processContextConfig
严重: Parse error in default web.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/context.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig defaultWebConfig
严重: Missing default web.xml, using application web.xml only conf/web.xml /usr/local/apache-tomcat-5.5.17/conf/web.xml
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/conf/web.xml (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2006-9-20 22:13:18 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2006-9-20 22:13:18 org.apache.catalina.core.StandardContext start
严重: Context [/balancer] startup failed due to previous errors
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager doUnload
严重: IOException while saving persisted sessions: java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:18 org.apache.catalina.session.StandardManager stop
严重: Exception unloading sessions to persistent storage
java.io.FileNotFoundException: /usr/local/apache-tomcat-5.5.17/work/Catalina/localhost/balancer/SESSIONS.ser (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at e.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-9-20 22:13:19 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2006-9-20 22:13:20 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2006-9-20 22:13:20 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/100 config=null
2006-9-20 22:13:20 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2006-9-20 22:13:20 org.apache.catalina.startup.Catalina start
信息: Server startup in 4922 ms