jsp的一些问题,救我,大虾们 - Java / Web 开发
Java code:
package friend;
import java.sql.*;
import java.util.*;
public class FriendUtil {
private Connection con;
public FriendUtil()
{
this.con=DataBaseConnection.getConnection();
}
public Collection getAllFriend() throws Exception{
Statement stmt=con.createStatement();
ResultSet rst=stmt.executeQuery("SELECT * from mywork");
Collection ret=new ArrayList();
while(rst.next()){
Friend temFr=new Friend();
temFr.setName(rst.getString("name"));
temFr.setAddress(rst.getString("address"));
temFr.setPhone(rst.getString("phone"));
temFr.setEmail(rst.getString("email"));
temFr.setQq(rst.getString("qq"));
ret.add(temFr);
}
stmt.close();
con.close();
return ret;
}
老提示这些问题:
Collection is a raw type. References to generic type Collection<E> should be parameterized ch8/WebRoot deleteFriend.jsp line 18 1274156616281 200
ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ch8/src/friend FriendUtil.java line 18 1274153813500 177
是不是jsp里取得结果用了范型?
你没有用泛型,就会有提示。
但不是错误吧
Collection ret=new ArrayList(); 应该
相关问答:
本人正在用Java做一个C/S架构的项目,
可是由于项目比较大,前期对架构的设计尤其重要,因为后期可能随时会加个功能或者去掉某些功能。
所以特地寻求如何设计C/S的架构使程序更加面向对象更加易于维 ......
我JSP的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
请我用FCK上传文件,在本地的windows机上测试可以,但部署到linux服务器上就上传不了文件,上传文件时一直卡在那里。望各位大虾指点,谢谢!
路过,帮你顶一下。。。。。。。。。。。。。。
上传文件的路径问题, ......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00
如何将距离目前最近的那个记录的name 更新为“x”呢
谢谢咯 啊 呵呵
update table_n ......