JSP È¡Êý¾Ý¿â¶àÐÐÊý¾Ý MVC½á¹¹ ÓÃELȡֵ
·½·¨´úÂë
public PenaltyCreditcard getPenaltyCreditcard(PenaltyCreditcard penaltycreditcard) throws Exception {
PenaltyCreditcard pc = null;
String sql = "Select Account_ID,creditcardType,penalty,limitTime,[name],phoneNumber,monthConsume,[creditworthiness] from CreditcardInfo where limitTime <=getdate() and monthConsume>0 ";
PreparedStatement pstmt = null;
try {
pstmt= DBConnection.getConnection().prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
// List list = new ArrayList();
while (rs.next()){
pc = new PenaltyCreditcard();
pc.setAccount_ID(rs.getInt(1));
pc.setCreditcardType(rs.getString(2));
pc.setPenalty(rs.getInt(3));
pc.setLimitTime(rs.getString(4));
pc.setName(rs.getString(5));
pc.setPhoneNumber(rs.getString(6));
pc.setMonthConsume(rs.getInt(7));
pc.setCreditworthiness(rs.getString(8));
pc.setCreateTime(penaltycreditcard.getCreateTime());
pc.setWregister_ID(penaltycreditcard.getWregister_ID());
System.out.println("Êý¾Ý¿âÈ¡³öµÄ·£¿îÐÅÓÿ¨"+rs.getInt(1));
}
pstmt.close();
rs.close();
} catch (Exception e) {
System.out.println("getPenaltyCreditcard()Òì³£"+e);
}finally {
// ¹Ø±ÕÊý¾Ý¿âÁ¬½
Ïà¹ØÎÊ´ð£º
ÎҵĿª·¢µÄƽ̨ÊÇMyeclipes6.0 + tomcat5.x + mysql
ÎÒËùÓеıàÂ뷽ʽ¶¼ÊÇÓõÄUTF-8
ÎÒÖ»ÓÃÁËStrtus¿ò¼Ü
ÔÚÒ»¸öformÖÐÈçÏÂÓõÄÊÇpostµÄÌá½»·½Ê½£º
<form class="form" action=&quo ......
ÎҵijÌÐòÈçÏ£º
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv=&q ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......