JSPÒ³Ãæ²ãµÄ¾Ñ鱸Íü×ܽá
1£º²éÕÒÒ³ÃæµÄ´úÂë´íÎóÓÌÈçÒ½Éú¸ø²¡ÈË¿´²¡£¬²»ÄÜͷʹҽͷ£¬½ÅÍ´Ò½½Å£¬¾ÍÊÇ˵һ¸öµØ·½µÄ“´íÎó”ÍùÍùÊÇÓɱðµÄµØ·½ÓÐÎÊÌâ¶øÒý·¢µÄ¡£
2£ºÈç¹ûÊý¾Ý·ÅÔÚrequestÖÐ(¿ÉÄÜ°üÀ¨url²ÎÊý)£¬ÄÇôҪÔÚºóÐøµÄÒ³Ãæ(»òÊÇˢкó)Öп´µ½ÒÔÇ°µÄÊý¾Ý¿ÉÒÔʹÓÃ${param.yourdate},²»¹ý·ÅÔÚActionFormÖпÉÄܸüºÃһЩ¡£
3£ºÔÚJSPÒ³ÃæÖÐʹÓÃÈÕÆÚBean£¬¿ÉÒÔʹÓÃÒÔϱêÇ©¸ñʽ»¯ÈÕÆÚÊý¾Ý(Êý×Ö£¬ÈÕÆÚ¸ñʽ»¯)
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:formatNumber value="${now.rates}" pattern="#,##0.00#" />//Êý×Ö¸ñʽ»¯
<jsp:useBean id="now" class="java.util.Date" />
Æðʼʱ¼ä
<input type="text" name="startTime" value="<fmt:formatDate value="${now }" pattern="yyyy-MM"/>-01" //ÈÕÆÚ¸ñʽ»¯
onFocus="calendar()" />
½áÊøʱ¼ä
<input type="text" name="endTime" value="<fmt:formatDate value="${now }" pattern="yyyy-MM-dd"/>"
readonly onFocus="calendar()" />
4:DAOÖеķ½·¨Ð´·¨£º·½·¨Ó¦¼Ì³Ðextends JdbcDaoSupport(ÐèÒª£ºimport org.springframework.jdbc.core.support.JdbcDaoSupport ¸ÃÀàÖзâ×°Á˺ܶàÓÐÓõķ½·¨,
Ö´ÐÐsqlÓï¾äÊÇʹÓãºthis.getJdbcTemplate() ÔÚµ÷ÓÃÏà¹ØµÄ·½·¨)
public Map findByProperty(String id, String startTime, String endTime) {
//logger.debug("finding WRONG_SMS_INFO instance with property: " + id);
String noUseSql = " select count(*) "
+ " from WRONG_SMS_INFO a,customer_info_getcnt b"
+ " where a.WORKER_ID=b.WORKER_ID"
+ " and a.receive_time>=to_date(?,'yyyy-MM-dd') and a.receive_time<to_date(?,'yyyy-MM-dd')+1"
+ " and b.DEPARTMENT_TREE like ? and a.OPERATION_CODE='05'";
Object[] totalParams = { startTime, endTime, depart };
Map map = null;
int total = 0;
try {
Ïà¹ØÎĵµ£º
̽Ë÷Èí¼þ¹¤×÷ÊÒ³¤ÆÚרҵ³Ð½ÓÖÐСÐÍÉÌÒµÈí¼þ»òÍøÕ¾£¬×îÓŻݵļ۸ñºÍ¸ßÖÊÁ¿µÄ·þÎñÆÚ´ýÄúµÄ»Ý¹Ë£¡
±¾¹¤×÷ÊÒ³Ð½Ó JSP ASP VB PB LotusNotes µÈÓïÑÔÒªÇóµÄÓ¦ÓÃϵͳ¿ª·¢ÒµÎñ
java jspʵսԴ³ÌÐò´úÂë:
......
ʹÓÃjspf
ÔÚ¿ª·¢ÖÐдjspÒ³Ãæʱ£¬Í¨³£¶¼ÒªÍ¨¹ýÈçÏ·½Ê½ÔÚjspÎļþÍ·²¿ÒýÈëÎÒÃÇÐèÒªµÄ±êÇ©¿â£¬È磺jspºËÐıêÇ©¿âJSTL£¬Struts ÖеÄ×Ô¶¨Òå±êÇ©£¬Ê±¶ø»¹ÓÐÎÒÃÇ×Ô¼ºÐ´µÄ×Ô¶¨Òå±êÇ©£º
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefi ......
1. servletÊÇÔÚjavaÀïǶÌ×html,jspÊÇÔÚhtmlÀïÃæǶÌ×java,jspÐèÒªÏȱàÒë³Éservlet²ÅÄÜÖ´ÐÐ.
2. jsp×îÖÕ·Òë³ÉservletÖ´ÐÐ.jspÈÝÒ×ÉÏÊֺͱàд¶øservletÐèÒª×Ô¼ºÊÖ¶¯±àÒë,ºÜÂé·³µÄ
3. servletÏÖÔÚ¸ü¶àÊdz䵱MVCÄ£ÐÍ¿ØÖÆÆ÷µÄ½ÇÉ«,ÓÉËü¸ù¾Ý¿Í»§µÄÇëÇó,À´¶¯Ì¬×éÖ¯·µ»ØÊý¾Ý»òÒ³ÃæµÄÖض¨Ïò,¶øJSPÖ»×öÏÔʾ(MVCÄ£ÐÍ,ÏÔʾ¿ØÖÆÄ£ÐÍ ÏÔ ......
ÔÚ±¾ÆªÎÄÕÂÖÐ,ÎÒÃǽ«»áÉîÈëÁ˽âÔÚ²»Í¬µÄTag LibraryÃèÊö·û(Tag Library Descriptors:TLDs)ÖÐʹÓø÷ÖÖ²»Í¬µÄtagµÄÇé¿ö.ÎÒÃǽ«»áÒÀ´ÎÑо¿ Ìõ¼þ¡¢Ñ»·¡¢URL¡¢U18N¡¢XMLµÈtagµÄÓ÷¨¡£ÒÔ´ËÀ´Ìá¸ßÄã¶ÔJSTLµÄÈÏʶºÍÓ¦ÓÃÄÜÁ¦,ÔÚÔĶÁ±¾ÎÄÇ°£¬ÄãÓ¦¸Ã¶Ô JSP Tag LibÓÐËùÁ˽⣬²¢ÇåÎúÓйØJSTL£¨JSP Standard Tag Libraries£©µÄ»ù± ......
<html>
<head>
<title>marquee</title>
<style>
#marq {
width:500px;
height:100px;
border:1px solid red;
overflow:hidden;
}
#mar ......