struts2-showcase项目启动报:Resource 'VM_global_library.vm' not found.

原文地址:http://lichunhui.iteye.com/blog/1872695


启动tomcat时,出现
2007-3-15 16:42:42 org.apache.catalina.core.ApplicationContext log
信息:  Velocity  [error] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
2007-3-15 16:42:42 org.apache.catalina.core.ApplicationContext log
信息:  Velocity   [info] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
2007-3-15 16:42:42 org.apache.catalina.core.ApplicationContext log
信息:  Velocity   [info] Velocimacro :  VM library template macro registration complete.

在goole 搜了很多,发现有这样一个回答

Absence of 'VM_global_library.vm' does not cause the build to fail. Its a
standard velocity message and you should ignore it, if you are not using
velimacros.

[error] ResourceManager : unable to find resource ‘VM_global_library.vm’ in any resource loader.

 

velocity.log出现这样的错误:
Mon Jan 17 10:21:14 CST 2011 [error] ResourceManager : unable to find resource ‘VM_global_library.vm’ in any resource loader.
Mon Jan 17 10:21:14 CST 2011 [info] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource ‘VM_global_library.vm’
但是,项目可以正常启动,运行,
而且整个项目中都没有VM_global_library.vm字样,看来是普遍问题了。
baidu一下,google一下,发现
Absence of ‘VM_global_library.vm’ does not cause the build to fail. Its a
standard velocity message and you should ignore it, if you are not using
velimacros.
也有的说是struts的版本问题,不管他了

还有一种解决方法:
直接修改Velocity的jar包里的属性文件即可,方法如下:
1)进入velocity-1.5.jar
2)打开org\apache\velocity\runtime\defaults\velocity.properties
3)修改内容如下:
runtime.log.logsystem.class = org.apache.velocity.runtime.log.NullLogSystem

以后再也不会有velocity.log文件出现了,也不会有找不到Log类的方法,更不需要添加这个logkit的jar包了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"POST /struts2-showcase/index.action" 是一个常见的Web请求,指示客户端正在向服务器的特定路径发送POST请求。在这种情况下,请求的路径是"/struts2-showcase/index.action"。 这个请求可能是针对使用Struts 2框架构建的Web应用程序的攻击尝试。Struts 2是一个流行的Java Web应用程序开发框架,但它也存在一些安全漏洞。攻击者可能会尝试通过发送特定的请求来利用这些漏洞。 要确保您的Web应用程序安全,您可以采取以下措施: 1. 更新和修补漏洞:确保您使用的Struts 2框架是最新的,并及时应用官方发布的安全补丁。这有助于修复已知的漏洞,并提供更好的安全性。 2. 输入验证和过滤:对于所有从客户端接收的输入数据,包括表单提交和URL参数,进行有效的输入验证和过滤。确保只接受预期格式和类型的数据,并避免执行任意代码。 3. 强化访问控制:通过实施适当的访问控制策略,限制用户对敏感功能和数据的访问。使用角色和权限来确保只有授权用户可以执行特定操作。 4. 安全日志记录和监控:确保您的Web应用程序具有适当的日志记录和监控机制,以便及时检测和响应任何异常活动。监控登录尝试、访问模式和异常请求等活动,以便尽早发现潜在的攻击。 5. 安全培训和意识:教育您的开发人员和用户有关常见的Web应用程序安全问题和最佳实践。提高他们对潜在威胁的意识,并确保他们知道如何正确处理敏感数据和执行安全操作。 请注意,以上建议是基本的安全实践,但仍然需要根据您的具体应用程序和环境进行调整和扩展。定期进行安全审查和渗透测试,并与安全专家合作,以确保您的Web应用程序的安全性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值