没有用过split函数,这是第一次用,不知道如下是何问题,请指教!多谢!
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 7 in the jsp file: /cyhtgl0520/htmod.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\cyhtgl0520\htmod_jsp.java:116: cannot find symbol
symbol : method Split(java.lang.String,java.lang.String)
location: class org.apache.jsp.cyhtgl0520.htmod_jsp
myArr=Split(PayDate,"|");
按照楼上两位的说法,我把程序改为
<%@ page import = "java.sql.*,java.text.*,java.lang.String" %>
String PayDate="20070501|20070601|20070701";
String[] myArr="";
myArr=PayDate.split("|");
还是不行!请问又是什么问题呢?是我少引入什么文件了吗?
报错如下:
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\cyhtgl0520\htmod_jsp.java:84: incompatible types
found : java.lang.String
required: java.lang.String[]
String[] myArr="";
^
海绵宝宝撒
阿晨1998
相关分类