Issue is when I using any filter or listener in my web xml, the following error will be displayed.
and my web.xml
Here is my config code:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId> <version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.1</version>
</dependency>
what can I do for this to be fixed?
This application previously was with tomcat7 plugin (tomcat7-maven-plugin) that will be used.The Tomcat7 plugin will download the Tomcat7 to the my machine, and once the Maven generate the war artifact, will deploy it to a Tomcat7 instance started by the plugin itself.
my configurations before
<configuration>
<port>8080</port>
<path>/${project.build.finalName}</path>
<additionalConfigFilesDir>${basedir}/src/main/tomcat/conf</additionalConfigFilesDir>
<systemProperties>
<log4j.configuration>file:./src/main/tomcat/conf/log4j.xml</log4j.configuration>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
</dependency>
</dependencies>
and later I changed it to this
<configuration>
<url>http://localhost:8099/manager/text</url>
<server>TomcatServer</server>
<path>/${project.build.finalName}</path>
<additionalConfigFilesDir>${basedir}/src/main/tomcat/conf</additionalConfigFilesDir>
<systemProperties>
<log4j.configuration>file:./src/main/tomcat/conf/log4j.xml</log4j.configuration>
</systemProperties>
</configuration>
so after those changes, the library scopes previously I had(provided) should be changed accordingly in pom.xml.After made that changes context started successfully.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.