jsp ¼òµ¥·ÖÒ³
//×ܼǼÊý
int count = personDao.getCount();
//ÿҳÏÔʾ5Ìõ
int pageSize = 5;
//µ±Ç°Ò³
int currentPage = 1;
int pageCount = (count + pageSize - 1) / pageSize;
String _currentPgae = request.getParameter("currentPage");
if (_currentPgae != null) {
currentPage = Integer.parseInt(_currentPgae);
}
if (currentPage < 1) {
currentPage = 1;
}
if (currentPage > pageCount)
currentPage = pageCount;
List list = personDao.getPageList((currentPage - 1) * pageSize,
pageSize);
Iterator it = list.iterator();
&
Ïà¹ØÎĵµ£º
³¤¶ÈÏÞÖÆJavaScript´úÂë
CODE:
<script> function test() { if(document.a.b.value.length>50) { alert("²»Äܳ¬¹ý50¸ö×Ö·û£¡"); document.a.b.focus(); return
false; } } </script> <form. name=a nsubmit="return test()"> <textarea name="b" cols="40" wrap="VIRTUAL" rows="6"></te ......
ÔÚÍøÉÏ¿´µ½ºÜ¶àÎÊÌâÊǹØÓÚÈçºÎѧϰjspµÄ£¬ÕýºÃÍøÉÏ¿´µ½Ò»Æª¹ØÓÚѧϰjspµÄÎÄÕ£¬¾ÍÕªÁËÒ»²¿·Ö·Òë¹ýÀ´£¬Ï£ÍûÄܶԴó¼ÒѧϰjspÓеãÖ¸µ¼¡£
¡¡¡¡Ò»¸öÆÕͨµÄ´íÎóÊÇ°ÑJSPµ±×÷¼ò»¯µÄ Java¡£Ëü²»ÊÇ£¬£¨ÊÂʵÉÏ, JSP ÊǼò»¯µÄ servlets ¡££©³ÌÐòԱͨ³£ÊÔ×ÅûÓÐѧϰҪÇóµÄÖ§³Ö¼¼ÇɶøÖ±½Óѧϰ JSP ¡£JSP ÊÇÒ»¸öÏνӼ¼Êõ£¬²¢Çҳɹ¦µØÁ¬½ ......
²»ÖªµÀÊDz»ÊÇÇý¶¯¼ÓÔØÓÐÎÊÌ⣬ÔÚMyEclipseÖÐдÁ˼òµ¥µÄÊý¾Ý¿â²âÊÔ³ÌÐòÕÒ²»µ½Çý¶¯À࣬ϣÍû´óϺÄܸøÓè°ïÖú£¬Ð»ÁË¡£
ÑÏÖØ: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.aspectj.lang.Signature
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClas ......
Ê×ÏÈÄãÒªÓÐtomcat,»¹ÒªÓÐoracle jdbcµÄjarµµµÈ»·¾³.
µÚÒ»²½: дJSP
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@(des ......
1¡¢Ò»¡¢ÏÈÌáÌõ¼þ£º ÔÚweb.xmlÖмÓÒÔÏÂÓï¾ä£¨ÔÒò²Î¿¼RESIN¹Ù·½Îĵµ£©
<servlet>
<servlet-name>SSIServlet</servlet-name>
<servlet-class>com.caucho.servlets.ssi.SS ......