我用jbuilder来编写JSP页面,以下代码是做一个测试,是利用自己写好的一些类来读取数据库里的数据。
但运行是却出现:"jsp1.jsp": cannot find symbol; symbol : method sizi(), location: class java.util.ArrayList 的错误。
错误是第一句发生的,请各位帮忙解释一下!
先谢谢各位回帖的前辈们!jsp1.jsp:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<%@ page import="test1.*" %>
<%@ page import="java.util.*" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<h1>
</h1>
<form method="post" action="jsp1.jsp" name="form1">
<input type="text" name="jcs"/>
<br />
<input type="submit" value="提交"/>
<br><br></form>
<%! String st=null;
User us=null;
DB db=new DB();
buyrecord record=new buyrecord();
ArrayList ary=new ArrayList();%><% st=request.getParameter("jcs");
ary=db.get_emanager_record(st); for(int i;i<ary.sizi();i++)
{
record=(buyrecord)ary.get(i);
out.print(record.getMeterialid());
}%>
</body>
</html>
但运行是却出现:"jsp1.jsp": cannot find symbol; symbol : method sizi(), location: class java.util.ArrayList 的错误。
错误是第一句发生的,请各位帮忙解释一下!
先谢谢各位回帖的前辈们!jsp1.jsp:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<%@ page import="test1.*" %>
<%@ page import="java.util.*" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<h1>
</h1>
<form method="post" action="jsp1.jsp" name="form1">
<input type="text" name="jcs"/>
<br />
<input type="submit" value="提交"/>
<br><br></form>
<%! String st=null;
User us=null;
DB db=new DB();
buyrecord record=new buyrecord();
ArrayList ary=new ArrayList();%><% st=request.getParameter("jcs");
ary=db.get_emanager_record(st); for(int i;i<ary.sizi();i++)
{
record=(buyrecord)ary.get(i);
out.print(record.getMeterialid());
}%>
</body>
</html>
解决方案 »
- 海康视频怎么能再jsp html页面中实现在线播放
- 访问一个字节数组奇数位的算法
- 请教Applet的问题
- 一个关于UUID的问题,很急啊,谢谢大家了
- 请教在一个action里面如何取得数据库中的树。并把其子节点。父节点区分开来!
- Javascript问题
- 关于Redirect requested but followRedirects is disabled的问题
- 请为刚毕业进软件公司的我指点迷津:):)
- 请大侠指点,一个jsp页面可否含有多个actionForm
- 请教这是什么错误?
- 如何实现只用类文件来测试与数据库的连接池?在tomcat6.0下
- "jsp1.jsp": <identifier> expected-------望高手指点
{
record=(buyrecord)ary.get(i);
out.print(record.getMeterialid());
}
"jsp1.jsp": cannot find symbol; symbol : class IOException, location: class org.apache.jsp.jsp1_jsp
"jsp1.jsp": cannot find symbol; symbol : class FileNotFoundException, location: class org.apache.jsp.jsp1_jsp
我已经catch所有的异常了,又是什么原因还会出现异常呢?<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<%@ page import="test1.*" %>
<%@ page import="java.util.*" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<h1>
</h1>
<form method="post" action="jsp1.jsp" name="form1">
<input type="text" name="jcs"/>
<br />
<input type="submit" value="提交"/>
<br><br></form>
<%! String st=null;
User us=null;
DB db=new DB();
buyrecord record=new buyrecord();
ArrayList ary=new ArrayList();%><% st=request.getParameter("jcs");
try{
ary=db.get_emanager_record(st);
for(int i=0;i<ary.size();i++)
{
record=(buyrecord)ary.get(i);
out.print(record.getMeterialid());
}
}catch(SQLException ex)
{
}catch(ClassNotFoundException ex1)
{
}catch(FileNotFoundException ex2)
{
}catch(IOException ex3)
{
}%>
</body>
</html>
你该把异常都输出出来,你只是捕获了异常,不输出具体信息,你以为TOMCAT能给你报出详细错误啊?