Troubled two days of the problem, very headache, and today finally have a solution to the idea, in the final analysis, or to maven enough to understand it. Always complaining about Maven is not good use, there are all kinds of unreasonable problems, originally these are attributed to it is not enough to understand the familiarity, it provides a good solution to the idea, but we usually do not know.
Issue background:Configure JSTL dependence on the blame,
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
</dependency>
Please look at this dependence, yes, it is JSTL jar package to you complete the whole underground down, but unexpectedly attached to the JSTL-dependent jar package like Servlet-api.jar, Jsp-api.jar down!!! So here's the problem, yes, most of your projects also need these two jar packages, but you know what's going to be scary? I don't know about the compatibility of the middleware version you're using, anyway, the two packages in my Tomcat are the conflicts with my project through maven down the package!!! That's enough, removing the two packets in Tomcat doesn't seem to work. Here's a look at the solution:fromShare: http://www.javacoder.cn/?p=195
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Dear ones, have you encountered the same distress as me? Try it quickly, if can help you, I am also very happy!!!
Correct configuration of jstl maven dependencies, jar package conflict problem finally solved