这是个老项目,使用的是JF5.1.5版本,使用Tomcat启动时没问题,想去掉tomcat,使用Undertow.但启动时就报错了
Starting JFinal 5.1.5 Info: jfinal-undertow 3.5, undertow 2.2.24.Final, jvm 1.8.0_201 Exception in thread "main" java.lang.NoClassDefFoundError: javax/el/ELResolver at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at com.jfinal.server.undertow.hotswap.HotSwapClassLoader.loadClass(HotSwapClassLoader.java:93) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.jfinal.render.JspRender.<clinit>(JspRender.java:41) at com.zssoft.gas.config.GasWebConfig.configConstant(GasWebConfig.java:133) at com.jfinal.core.Config.configJFinal(Config.java:51) at com.jfinal.core.JFinal.init(JFinal.java:61) at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:64) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111) at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:86) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:594) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601) at com.jfinal.server.undertow.UndertowServer.configHttp(UndertowServer.java:302) at com.jfinal.server.undertow.UndertowServer.doStart(UndertowServer.java:280) at com.jfinal.server.undertow.UndertowServer.start(UndertowServer.java:153) at com.zshsoft.application.Application.main(Application.java:19) Caused by: java.lang.ClassNotFoundException: javax.el.ELResolver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.jfinal.server.undertow.hotswap.HotSwapClassLoader.loadClass(HotSwapClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 27 more
项目:JFinal
将 jsp 换成 jfinal enjoy 试一下