请问一个关于java web开发的问题,jsp页面调试的

来源:百度知道 编辑:UC知道 时间:2024/05/27 14:42:03
An error occurred at line: 20 in the generated java file
Only a type can be imported. org.apache.taglibs.standard.tag.common.core.Util resolves to a package

An error occurred at line: 253 in the jsp file: /happyjuddi.jsp
Util cannot be resolved

250: if ((dsname == null) || (dsname.trim().length() == 0)) {
251: dsname = "java:comp/env/jdbc/juddiDB";
252: } else {
253: dsname = Util.escapeXml(dsname);
254: }
255:
256: ctx = new InitialContext();

谁能给我解释一下代码上面那几句话是什么问题,特别是“Only a type can be imported.”“resolves to a package”“Util cannot be resolved”都是什么意思?这种问题改怎么解决?

Util没有导入 看看你文件最前面jsp里的import部分,包与包间用逗号区分,要用全称类名,import要用=”全称类名“

好像jsp 里import类的时候出错了,你再仔细检查

java:comp/env/jdbc/juddiDB路径下不存在juddiDB

import java.util.*;要引入这个包

没有导包 少架包