验证码生成失败
来源:4-12 引入kaptcha实现验证码
weibo_RUES无需言_0
2018-11-09
严重: Allocate exception for servlet [Kaptcha]
java.lang.ClassNotFoundException: com.google.code.kaptcha.servlet.KaptchaServlet
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:525)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:773)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:790)atorg.apache.tomcat.util.net.NioEndpointConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpointConnectionHandler.process(AbstractProtocol.java:790)atorg.apache.tomcat.util.net.NioEndpointSocketProcessor.doRun(NioEndpoint.java:1468)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutorWorker.run(UnknownSource)atorg.apache.tomcat.util.threads.TaskThreadWorker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThreadWorker.run(UnknownSource)atorg.apache.tomcat.util.threads.TaskThreadWrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
3回答
-
没懂,changeVerifyCode is not defined
同学你common.js里面有
function changeVerifyCode(img) {
img.src = "../Kaptcha?" + Math.floor(Math.random() * 100);
}
这个function吗?
并且如果有,你是否清楚了浏览器缓存了呢
042018-11-10 -
weibo_RUES无需言_0
提问者
2018-11-09
111
00 -
weibo_RUES无需言_0
提问者
2018-11-09
可以生成验证码了,我什么都没改,也没重启tomcat.好奇怪
现在点击更换的时候浏览器上面报错:
shopoperation:141 Uncaught ReferenceError: changeVerifyCode is not defined
at HTMLImageElement.onclick (shopoperation:141)
at a.sendClick (sm.min.js:7)
at a.onTouchEnd (sm.min.js:7)
at HTMLBodyElement.<anonymous> (sm.min.js:7)已经引入了common.js。。
00
相似问题