简体   繁体   English

无法在JSP页面上导入org.apache.commons.lang

[英]Trouble importing org.apache.commons.lang on JSP page

I'm having trouble importing the org.apache.commons.lang.StringEscapeUtils which gives me the error: The import org.apache.commons.lang cannot be resolved I know this question has been posted a number of times but i tried them and it didnt solve my problem. 我在导入org.apache.commons.lang.StringEscapeUtils时遇到问题,这给了我错误: 导入org.apache.commons.lang无法解决我知道这个问题已经发布了很多次了,但是我尝试了它没有解决我的问题。

在此处输入图片说明

Things i did were: 我所做的是:

  • Download the packages and add them to the WEB-INF/lib folder 下载软件包并将其添加到WEB-INF/lib文件夹
  • Imported but it still showed me the error 导入但仍然显示错误
  • Restarted server 重新启动服务器
  • Cleaned project several times 多次清理项目
  • Closed eclipse and back on 封闭的日食,然后再继续

Nothing solved my problem. 没有任何办法解决我的问题。 Any suggestion? 有什么建议吗?

You are using version 3 of Apache Commons Lang. 您正在使用Apache Commons Lang的版本3。 The correct import is: 正确的导入是:

org.apache.commons.lang3.StringEscapeUtils

Note the lang3 part of the path 注意路径的lang3部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM