StringUtils cannot be resolved

I am using Java server pages and for using String Manipulations and i am Using StringUtils which i am not able compile.It says that "StringUtils cannot be resolved.". I am sorry to say that i added this to CLASSPATH, i have also put the jar file in the lib file of Apache tomcat... and in the lib file where my jsp files are located...

Actually i am using Dreamweaver trial version and programmers notepad...?

if i want to add a big import .. PLease tell me how to do so.. or do i have to compile the whole thing?

Looks like the problem is not with the classpath but the import.

Can you import the StringUtils in your jsp? Below should help

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

I dont see it as classpath issue, because if it was not able to locate the classes, it should have given you ClassNotFoundException. But yes, you need to have classpath set properly, which i think you have already taken care of.

时间: 2024-11-05 17:32:04

StringUtils cannot be resolved的相关文章

The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files

问题描述 Exception in thread "main" java.lang.Error: Unresolved compilation problems: The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files The method getText() from the type TagNode refers to the

解决Eclipse中C++代码显示Symbol &amp;#39;std&amp;#39; could not be resolved的问题

第一次在Eclipse中写C++代码,写了一个简单的hello world程序,还没有等我编译.就报出了各种错误,但是这么简单的代码.怎么可能这么多错误.于是没有理会.编译执行后,能够正常输出!!!Hello World!!!,但是我的代码中还是有非常多红叉,把鼠标放在上面显示:Symbol 'std' could not be resolved 这种信息. 于是问题来了.怎样解决? 方法:写完库函数以后立刻保存.这样写之后的代码就不会报错了 比如:-->首先写#include <iostre

源码分析八(org.springframework.util包之StringUtils类))

一:spring框架util包中的StringUtils类主要是处理关于字符串 的功能方法,下面直接结合代码分析: //判断字符串是否为空,如果为nul或者""则返回true,否则返回false public static boolean isEmpty(Object str) { return str == null || "".equals(str); } //判断字符串是否有长度,不等于null同时长度大于0,则为true //这里重载两个hasLength方

StringUtils

//需要导入第三方jar包pinyin4j.jar import net.sourceforge.pinyin4j.PinyinHelper; import java.util.regex.Matcher; import java.util.regex.Pattern; public class StringUtils { protected static final String TAG = StringUtils.class.getSimpleName(); /** * 增加空白 */ pu

(转)eclipse报错及解决说明 &quot;XX cannot be resolved to a type &quot;

场景:在项目开发时,一个工程引用另一个工程中的文件,出现报错“XX cannot be resolved to a type”,但是在实际通过跟踪“F3”能够找到相应的文件,最终用方法4解决. 引言: eclipse新导入的项目经常可以看到“XX cannot be resolved to a type”的报错信息.本文将做以简单总结. 正文: 1 jdk不匹配(或不存在) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPa

ERROR:The type javax.servlet.http.HttpServletRequest cannot be resolved.

MyEclipse中附加工程出现如下错误:The type javax.servlet.http.HttpServletRequest cannot be resolved.  解决方法如下: (1)右键工程找到build path项 (2)找到Add Libraries (3)点击myEclipse Libraries,Next (4)添加JavaEE 5

cannot be resolved to a type in same package 问题解决

在 STS 上,一个类引用在相同 package 中另一个类,但是报 cannot be resolved to a type 错误. 解决方法 : Alternatively, you can highlight the project : Choose Clean ... from Project menu and if you have activated the Build Automatically option (in the same menu), the classes will

使用Maven创建Web项目后,jsp引入静态文件提示报错。JSP 报错:javax.servlet.ServletException cannot be resolved to a type

使用Maven创建Web项目后,jsp引入静态文件提示报错. 错误提示:javax.servlet.ServletException cannot be resolved to a type 错误如下图: 解决方案: 在Maven的pom文件中引发如下依赖即可: <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <versio

肯爹的 StringUtils.isNumeric(String str)

在项目中遇到一处bug,调试的结果竟然是StringUtils.isNumeric(String str) 在捣鬼(采用的是org.apache.commons.lang.StringUtils),下面的代码是判断一个参数非空,且为整数: if(StringUtils.isNumeric(str) && StringUtils.isNotBlank(str)){ // do sth } 在简单不过的代码,却隐藏着bug ! 因为如果 str = "-1"; String