Adding this dependency fixed it :-
org.mortbay.jetty
jsp-2.1
6.0.0
java.lang.ClassNotFoundException: org.apache.jasper.runtime.JspApplicationContextImpl
解决方案:
Adding this dependency fixed it :-
org.mortbay.jetty
jsp-2.1
6.0.0
2、在war中添加对jar包的依赖,报错:
Invalid classpath publish/export dependency /xxx. Project entries not supported
解决方案:在war包的pom.xml中添加:
org.apache.maven.plugins
maven-eclipse-plugin
2.9
org.eclipse.jdt.core.javanature
org.eclipse.jdt.core.javabuilder
然后再
mvn eclipse:clean
mvn eclipse:eclipse
解释:
一般的eclipse的项目空间有.project和.classpath两个文件.执行eclipse:eclipse就是让maven的eclipse插件把.classpath内的jar引用地址重新更新一遍.
eclipse:clean就是删除所有eclipse项目文件在用eclipse:eclipse重建
3、在多模块项目运行时,执行 mvn jetty:run告警:
Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
在pom.xml中增加:
GBK是文件在系统中的编码来设置的。
4、将log4j.propertites文件放在src目录下,用Test类测试时正常使用,但发布后报错:
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.R
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
解决方案:
将log4j.propertites文件放在resources目录下。