解决报错问题:At least one JAR was scanned for TLDs yet contained no TLDs.

问题描述:后台报错

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

出现这样的log说明,这条log所指的 jar 做了TLDs的扫描,并且没有在其中找到 TLDs,并且建议打开debug级别的log,查看相关的 jar 文件,在 Tomcat 配置文件中忽略对这样的 jar 的TLDs扫描。

页面报错:getElementById() 被传递了空字符串参数。

Object { name: "管理员", password: "123456" },但是输出是有参数的。

遇到这个问题,查了百度大多数都是说修改Tomcat的文件或者说有<!-- -->之类的,但是自己去试了一下,都没有用。只是自己的情况但是不知道你们的情况是否是这样。

还好现在解决了,也算是给自己一个回忆记得以后别二了。

不过也还好是同事的提醒了一下说是不是你设置拦截了,然后就去看了一下配置信息。

因为用的是shiro做登录验证的,所以就把web.xml配置shiro的安全框架给注解掉了:

运行项目然后这时报了一个另外的错误:org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an invalid application configuration.

org.apache.shiro.UnavailableSecurityManagerException:NoSecurityManager可被调用代码访问,要么绑定到org.apache.shiro.util.ThreadContext,要么绑定为VM静态单例,这是一个无效的应用程序配置。

这个时候看了一下spring-shiro.xml的配置文件,才发现:

登录页面的请求路径没有添加进去,添加红线上的路径后就ok了。希望也能帮到你们!

原文地址:https://www.cnblogs.com/jon-yang/p/9225542.html