开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜