Skip to content

Commit cd5a8bd

Browse files
committed
update jave
1 parent c12584d commit cd5a8bd

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Java学习之路.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9988,6 +9988,35 @@ Class类是为了保存JAVA虚拟机运行时(RTTI)对所有对象进行类型
99889988

99899989
补充:tomcat最好也换也tomcat7
99909990

9991+
# Tomcat启动报Error listenerStart错误
9992+
9993+
今天启动Tomcat启动不了,报以下错:
9994+
9995+
org.apache.catalina.core.StandardContext startInternal
9996+
SEVERE: Error listenerStart
9997+
org.apache.catalina.core.StandardContext startInternal
9998+
SEVERE: Context [/******] startup failed due to previous errors
9999+
10000+
Tomcat报的错太含糊了,什么错都没报出来,只提示了Error listenerStart。为了调试,我们要获得更详细的日志。可以在WEB-INF/classes目录下新建一个文件叫logging.properties,内容如下
10001+
10002+
```properties
10003+
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
10004+
10005+
############################################################
10006+
# Handler specific properties.
10007+
# Describes specific configuration info for Handlers.
10008+
############################################################
10009+
10010+
org.apache.juli.FileHandler.level = FINE
10011+
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
10012+
org.apache.juli.FileHandler.prefix = error-debug.
10013+
10014+
java.util.logging.ConsoleHandler.level = FINE
10015+
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
10016+
```
10017+
10018+
这样,我们再启动tomcat时,就会在logs目录下生成一个更详细的日志error-debug.2012-05-31.log。我碰到的错误是FileNotFoundException.大家碰到的错应该各式各样都有,所以就要具体问题具体分析了。 tomcat的logging文档具体可参考http://tomcat.apache.org/tomcat-7.0-doc/logging.html
10019+
999110020
# 比较好的文章
999210021

999310022
* 浅析Web工程目录和tomcat目录: http://blog.csdn.net/ystyaoshengting/article/details/6204886

0 commit comments

Comments
 (0)