只能导入一个类型。 org.apache.commons.lang.StringUtils 解析为一个包
我是 JSP 新手,遇到了以下问题:我必须修改应用程序以添加一些功能,我决定使用 StringUtils 来查找标签之间的字符串,它在我的 Tomcat 7 开发环境中工作正常,但是,当我将它上传到我的托管环境,使用Tomcat 5.5(我知道我应该在开发环境中使用相同的版本,但直到最近我才知道它是哪个版本)我得到标题中提到的错误,当然,每当我打电话时
StringUtils.substringBetween(a,b,c)
我也收到错误,说无法解析该类。任何帮助将不胜感激。
导入列表:
<%@ page import="java.sql.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.security.MessageDigest" %>
<%@ page import="sun.misc.*" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
我的WEB-INF/lib目录中有commons-lang-2.6.jar和customJar.jar,还有一个来自customJar.jar的导入,这似乎没问题......
谢谢为了您的帮助,如果我没有提供足够的信息,我深表歉意,并将尽快提供以解决此问题。
i'm new to JSP and i ran into the following problem: I had to modify an application to add some functionalities, i decided to use StringUtils to find strings between tags and it worked OK on my development environment with Tomcat 7, nevertheless, when i uploaded it to my hosting environment, with Tomcat 5.5 (i know i should use the same versions in the development environment, but i didn't know which version it was until recently) i get the error mentioned in the title, of course, whenever i call
StringUtils.substringBetween(a,b,c)
I also get errors, saying that the class cannot be resolved. Any help will be greatly appreciated.
List of imports:
<%@ page import="java.sql.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.security.MessageDigest" %>
<%@ page import="sun.misc.*" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
I have the commons-lang-2.6.jar as well as a customJar.jar in my WEB-INF/lib directory, there is also an import from customJar.jar, which seems to be OK...
Thank you for your assistance, if i didn't provide enough information, i apologize for it and will provide as soon as i can in order to solve this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论