我正在使用Spring工具套件3.7.0和我从STS仪表板安装的gradle插件。默认情况下,gradle任务是空的。我使用“构建”任务生成war文件,但是tomcat7没有将war文件识别为有效的war文件。我需要使用任何其他gradle任务来生成war文件。
此外,build.gradle文件包含以下插件,
apply plugin: 'base'
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
Tomcat7显示以下日志。没有错误,但是我没有显示应用程序初始化时设置的日志记录。
Oct 28, 2015 2:14:12 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/branch] has started
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/javaee-api-6.0-6.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Oct 28, 2015 2:14:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/var/lib/tomcat7/webapps/branch/WEB-INF/lib/jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Oct 28, 2015 2:14:15 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/branch] is completed
答案 0 :(得分:0)
解决了它。我用来构建war文件的java版本是不同的。我很惊讶没有抛出任何错误。