Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSP µÄpager taglib ·ÖÒ³

1: ÎÒÃÇÐèÒªÏÂÔØpage±êÇ©µÄjar°ü; pager-taglib.jar
   [ÑùÀý´úÂë]: http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.war
               ½âѹwarÎļþ ÔÚ{..}\WEB-INF\lib\pager-taglib.jar
2:°ÑÕâ¸öjar ¿½±´µ½ÄãµÄweb¹¤³ÌµÄlibÖÐ;
3: 3-1 ¸Ã±êÇ©ÐèÒªÎÒÃÇÌṩ1¸ö×î¹Ø¼üµÄ²ÎÊý ---¡· ×ÜÊý¾ÝÁ¿ select count(*)µÄÖµ
   3-2 ÿҳÏÔʾµÄ¼Ç¼Êý
   3-3 Ò³ÂëµÄ¸öÊý
   3-4 ÄãµÄÕâ¸öÓ¦ÓõÄurl
   3-5 Èç¹ûÄãµÄÕâ¸öÓ¦ÓÃÓвÎÊýµÄ³¡ºÏ ÄãÐèÒªÉèÖÃurlµÄ²ÎÊý
4£ºÄ¬Èϵij¡ºÏ²éѯÊý¾Ý¿âµÄ¿ªÊ¼Ë÷Òý µÄ²ÎÊýÃû³ÆÎªpager.offset
5:
   ºǫ́µÄ´¦Àí
   ºǫ́µÄactionÖÐ ÔÚrequest.getParameter("pager.offset"); ÀïµÃµ½²éѯÊý¾Ý¿âµÄ¿ªÊ¼Ë÷Òý
   ²¢¼ÆËã²éѯµÄ×ÜÊý¾ÝÁ¿²¢½«¼ÆËãµÄ½á¹û±£´æÔÚrequset.setAttribute('totalpage');
   °ÑÏà¹ØµÄ²éѯ½á¹ûÉèÖõ½requset.setAttribute('xxlist');
6: ǰ̨´¦Àí
   ÔÚÏàÓ¦jspÒ³ÃæÉÏÌí¼Ó <%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
   È¡µÃcount(*)µÄÖµ
    <%
        Integer totalPage = (Integer)request.getAttribute("totalPage");
    %>
   <pg:pager
             items="<%=totalPage%>" ----¡·count(*)Öµ
             index="center"         (ºöÂÔ)
             maxPageItems="5"       ÿҳÏÔʾµÄ¶àÉÙÐÐÊý¾Ý Õâ¸ö²ÎÊýºÍÎÒÃÇhibernateÖÐ maxResult ÊÇÒ»ÖµÄ
     maxIndexPages="10"     ÏÔʾµÄ×î´óÒ³Âë
     isOffset="<%= true %>" (ºöÂÔ)
     export="offset,currentPageNumber=pageNumber" (ºöÂÔ)
     scope="request" &nbs


Ïà¹ØÎĵµ£º

JSPÖеļ¸ÖÖ°üº¬Ò³Ãæ·½·¨µÄÇø±ð

(1)include     ÔÚJSP±àÒë³ÉJavaÀàÎļþʱ£¬ÏȽ«includeÎļþÄÚÈݺϲ¢ºó£¬ÔÙ½øÐбàÒë
(2)jsp:include     ÔËÐÐʱºÏ²¢,»á½«ÔËÐÐʱµÄ½á¹û°üº¬½øÀ´
(3)c:import     ÔËÐÐʱºÏ²¢,»á½«ÔËÐÐʱµÄ½á¹û°üº¬½øÀ´
Òò´Ë£¬
£¨1£©ÀûÓÃinclude°üº¬µÄÒ³ÃæÖÐÈç¹û°üº¬Á˺ÍÔ­Ò ......

´¿JSP·ÖÒ³´úÂëÖ®Mysql

//ÔËÐÐͼ:
//Á¬½Ó×Ö·û´®
String url="jdbc:mysql://localhost/"+dbName+"?user="+userName+"&password="+userPasswd;
Class.forName(driverName).newInstance();
Connection connection=DriverManager.getConnection(url);
Statement statement = connection.createStatement();
//ÿҳÏÔʾ¼Ç¼Êý
int PageSize ......

ÔÚJSPÖÐÅäÖÃFCKeditor 2.6.4

1.FCKeditor ½éÉÜ
FCKeditor Õâ¸ö¿ªÔ´µÄHTML Îı¾±à¼­Æ÷¿ÉÒÔÈÃweb ³ÌÐòÓµÓÐÈçMS Word ÕâÑùÇ¿´óµÄ±à¼­¹¦ÄÜ£¬.FCKeditor Ö§³Öµ±Ç°Á÷ÐеÄä¯ÀÀÆ÷¡£
2£®×¼±¸¹¤×÷£º
»·¾³£ºwinddows XP¡¢tomcat6.0¡¢JDK1.6
ÏÂÔØ£º
1)£ºFCKeditor_2.6.4.zip
µØÖ·£ºhttp://nchc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.4.zip ......

JSPÒ³ÃæÌø×ª´óÈ«

JSPÖеÄÌø×ª£º
(1). forward()·½·¨
ʹÓõ½javax.servlet.RequestDispatcherÀà
RequestDispatcher rd = getServletContext().getRequestDispatcher("url");
rd.forward(requestVar,requestVar); //´«µÝservletµÄÈë¿Ú²ÎÊý
/*forwardº¯ÊýÒѾ­°ÑÔ­Ò³ÃæµÄrequest,response¶ÔÏó´«ÈëеÄÒ³Ãæ£¬Òò´ËÕâо ......

jsp×Ô¶¨Òå±êÇ©(tag)¿ª·¢

1 ±ê¼Ç´¦Àí³ÌÐòÀà
´¦ÀíÀà¼Ì³ÐTagSupportÀà²¢ÖØÔØdoStartTag()·½·¨,
       Ôڸ÷½·¨ÖÐʹÓÃout.print();Êä³öÐèÒªµÄÊý¾Ýµ½Ê¹Óñ¾±êÇ©µÄjspÒ³Ãæ
package cn.xxx;
public class DateTag extends TagSupport {
private static final long serialVersionUID = 1L;
public int doStartTag() thr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ