开发者

JSP can't resolve import of org.apache.commons.lang

开发者 https://www.devze.com 2022-12-21 07:09 出处:网络
I am trying to include the library StringEscapeUtils and everything that I can find indicates that I can import the Apache Org page as follows:

I am trying to include the library StringEscapeUtils and everything that I can find indicates that I can import the Apache Org page as follows:

<%@ page import="org.apache.commons.lang.StringEscapeUtils" %>

however, I can only reso开发者_如何学Pythonlve the URL down to this:

<%@ page import="org.apache.commons.*" %>

and when I do that, the compile still cannot resolve StringEscapeUtils.

What am I doing wrong?


In Java, imports are not references to URLs, they are references to Java packages. To import that class, you will need to include the commons-lang JAR in your classpath.

If this is related to your earlier question, you do not appear to need an external library, as I explained there.

0

精彩评论

暂无评论...
验证码 换一张
取 消