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

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();
 &


Ïà¹ØÎĵµ£º

jsp ÑéÖ¤

³¤¶ÈÏÞÖÆ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ÖÐforward()ÓësendRedirect()Çø±ð

response.sendRedirect("display.jsp");
request.getRequestDispatcher("display.jsp").forward(request,response);
jspµÄÒ³ÃæÌø×ªÓÐÁ½ÖÖ·½·¨£ºRequestDispatcher.forward()·½·¨ºÍHttpServletResponse.sendRedirect()·½·¨¡£
¡¡¡¡ËüÃǵÄÇø±ðÊÇ£º
¡¡¡¡RequestDispatcher.forward()·½·¨½öÊÇÈÝÆ÷ÖпØÖÆÈ¨µÄתÏò£¬ÔÚ¿Í»§¶Ëä ......

JSPѧϰ£¨Ò»£©

JSP»ù±¾Óï·¨
´ó²¿·ÖJSP±»Ò»¸öÒÔ“<%” ¿ªÍ·ºÍÒÔ“%>”½áβµÄµÄ±ê¼ÇÀ¨ÔÚÆäÖС£ÔÚ¸üеÄJSP 1.1¹æ·¶³ǫ̈ºó£¬¾ÍÓÐÁËÓëXML¼æÈݵİ汾¡£
JSPÖ¸ÁîºÍ½Å±¾ÔªËØ
Directives <%@ directive %>
Declarations <%! declaration %>
Expressions <%= expression %>
Code Fragment/ ......

jqueryÖ±½ÓÏÔʾjsp·µ»ØµÄÊý¾Ý

jQueryÊÇĿǰһ¸öºÜÁ÷ÐеÄjs¿ò¼Ü£¬ËüÒ²ÌṩÁ˶ÔajaxºÜºÃµÄÖ§³Ö¡£Ê¹ÓÃajaxÒì²½ÇëÇóÊý¾Ýʱ£¬Èç¹û·þÎñÆ÷·µ»ØµÄÒ»¸öÁбíÊý¾Ý£¬Í¨³£µÄ×ö·¨ÊǰÑÁбíÊý¾Ýת»»³Éjson¸ñʽµÄÊý¾Ý£¬È»ºó·µ»Øµ½Ò³Ã棬ʹÓÃjQuery½øÐнâÎö²¢Óñí¸ñÀ´ÏÔʾ£¬ÕâÒªÇóÄã¶Ôjavascript½âÎöjsonºÜÊì͸¡£
ÎÒÔÚÕâÀïÌṩһÖÖͶ»úÈ¡ÇɵÄ×ö·¨£¬Ê¹ÓÃjQuery·¢ËÍÒì²½ÇëÇó ......

jspÖÐʹÓÃjavabeanµÄÁ½µã×¢ÒâÊÂÏî

jspÖÐʹÓÃjavabeanµÄÁ½µã×¢ÒâÊÂÏî
Ê×ÏÈÒ»µã£ºjavabeanÒ»¶¨Òª·ÅÔÚÃüÃû°üÀ²»ÄÜ·ÅÔÚĬÈϰüÀҲ¾ÍÊÇÔÚbeanÎļþµÄ¿ªÍ·Òªpackage¡¡pname;ÁË£¬Èç¹û²»·ÅÔÚÃüÃû°üÀï¶ø·ÅÔÚÁËĬÈϰüÀ×îºó½«±¨ÈçÏÂÕâÑùµÄ´íÎó£º
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 18 in the ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ