类型:转载 责任编辑:asp 日期:2007/03/01
下栽一个acai论坛,前几步都能通过,进去的时候,就出现下面错误~
exception
org.apache.jasper.jasperexception: unable to compile class for jsp
an error occurred between lines: 64 and 320 in the jsp file: /acaiforum1/index.jsp
generated servlet error:
e:\tomcat 4.0\work\standalone\localhost\examples\acaiforum1\index$jsp.java:566: class java.lang.string 中未找到方法 split(java.lang.string)。
string [] masternames=theforum.getforummaster().split("\\|");
^
1 个错误
at org.apache.jasper.compiler.compiler.compile(compiler.java:285)
at org.apache.jasper.servlet.jspservlet.loadjsp(jspservlet.java:548)
at org.apache.jasper.servlet.jspservlet$jspservletwrapper.loadifnecessary(jspservlet.java:176)
at org.apache.jasper.servlet.jspservlet$jspservletwrapper.service(jspservlet.java:188)
at org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:381)
at org.apache.jasper.servlet.jspservlet.service(jspservlet.java:473)
at javax.servlet.http.httpservlet.service(httpservlet.java:853)
at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:247)
at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:193)
at org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:243)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:566)
at org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:472)
at org.apache.catalina.core.containerbase.invoke(containerbase.java:943)
at org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:190)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:566)
at org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:475)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:564)
at org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:472)
at org.apache.catalina.core.containerbase.invoke(containerbase.java:943)
at org.apache.catalina.core.standardcontext.invoke(standardcontext.java:2347)
at org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:180)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:566)
at org.apache.catalina.valves.errordispatchervalve.invoke(errordispatchervalve.java:170)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:564)
at org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:170)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:564)
at org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:468)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:564)
at org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:472)
at org.apache.catalina.core.containerbase.invoke(containerbase.java:943)
at org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:174)
at org.apache.catalina.core.standardpipeline.invokenext(standardpipeline.java:566)
at org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:472)
at org.apache.catalina.core.containerbase.invoke(containerbase.java:943)
at org.apache.catalina.connector.http.httpprocessor.process(httpprocessor.java:1027)
at org.apache.catalina.connector.http.httpprocessor.run(httpprocessor.java:1125)
at java.lang.thread.run(thread.java:484)
推荐阅读
你的jdk版本低了,split方法是jdk1.4的,换个1.4的jdk
yuanmeng163(今天我有空):
回答的正确!错误的原因是
无法编译jsp文件,因为string不包括split()方法
换1.4
祝你好运!
split
public string[] split(string regex)
splits this string around matches of the given regular expression.
this method works as if by invoking the two-argument split method with the given expression and a limit argument of zero. trailing empty strings are therefore not included in the resulting array.
the string "boo:and:foo", for example, yields the following results with these expressions:
regex result
: { "boo", "and", "foo" }
o { "b", "", ":and:f" }
parameters:
regex - the delimiting regular expression
returns:
the array of strings computed by splitting this string around matches of the given regular expression
throws:
patternsyntaxexception - if the regular expressions syntax is invalid
nullpointerexception - if regex is null
since:
1.4
see also:
pattern
所以还是下一个jdk吧~