The latest project always has a 404 error. The error message is not displayed on the console. I can't see it either under Tomcat.
The cause of the Error. Later, I found a method on the Internet to print the tomcat record information. First in Tomcat
In the installation directory of the common/classes/uninstalled tomcat, you can find the unzip package of tomcat.
The content of the log4j. properties file is
- log4j.rootLogger=info,Console,R
-
- log4j.appender.Console=org.apache.log4j.ConsoleAppender
-
- log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-
- #log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
-
- log4j.appender.Console.layout.ConversionPattern=%d{yy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n
-
-
-
- log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
-
- log4j.appender.R.File=${catalina.home}/logs/tomcat.log
-
- log4j.appender.R.layout=org.apache.log4j.PatternLayout
-
- log4j.appender.R.layout.ConversionPattern=%d{yyyy.MM.dd HH:mm:ss} %5p %c{1}(%L):? %m%n
-
-
-
- log4j.logger.org.apache=info,R
-
- log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R
-
- log4j.logger.org.apache.catalina.core=info,R
-
- log4j.logger.org.apache.catalina.session=info,R
-
Then add the commons-logging.jar, log4j. jar in the common/lib, and then generate
The File name and output path of a tomcat. log File can also be repaired in the above log4j. appender. R. File
), The specific error information can be found above. If eclipse is used, it can be directly found on the console.
To see the error message. This problem plagued me for one night. Finally, the ing files and
The entity class is not read in applicationContext. xml. If you think there is too little information on the console
Use this method to view details. I hope it will be useful to everyone. Of course, I will laugh at it.
This article is from the "Just do it" blog, be sure to keep this source http://davenzeng.blog.51cto.com/3896952/1143993