ÇóÖúÒ»¸öJSPµÄÎÊÌ⣡
Function 1:
Grab content from Animenfo.com and generate corresponding tables in mysql.
1. Grab content from
http://animenfo.com/statistic/top.php?type=anime
And the corresponding anime show links
Parse the HTML to generate the following
2. Create mySQL table with following columns:
Rank
Genres
Year Published
Title
Category
Description
ImageLink
3. (Optional): Save images at local server and change ImageLink to local path
You need to use JSP (NOT servlet, but JSP page can embed java code) to parse HTML and create table in database. So one JSP does everyone, you don¡¯t need other .java file. Some contents are within <td> label. Other contents for a particular record, you need look for them through the title link. For second step, you can use SQL language to create the table. Rank can be the primary key (re-number it if duplicated). The table needs to compatible with UTF-8 for character set.
ÕâÊDZðÈËÒªÇó×öµÄÒ»¸öС¹¤¾ßµÄ˵Ã÷Ê飬´ó¸ÅµÄÒâ˼ÎÒ¶¼¶Á¶®ÁË£¬µ«ÊÇÎÒ²»Ì«Ã÷°×Õâ¸ö¹¤¾ßµÄ×÷Óã¬Çë´ïÈËÀ´½âÊÍһϣ¬Ð¡µÜ²ËÄñÒ»¸ö¡£
{{--
Ïà¹ØÎÊ´ð£º
jspÖÐinclude.incµÄ×÷ÓÃÊÇʲô£¿
include.incɶÒâ˼£¿Ã»Ìý˵¹ý
Java code:
<%include file="include.inc"%>¼ÓÔØÍøÕ¾Ä¿Â¼include.incÎļþÄÚÈÝ
°üº¬Ò»¸ö¾²Ì¬Ò³Ãæ°É···
& ......
Óû§µÇ¼ϵͳ¾Í¿ÉÒÔÔÚÓÒϽǵ¯³ö×Ô¼ºÊÕµ½µÄÏûÏ¢Ìáʾ¿ò
ÇëÎʸ÷λ´ó¸çÕâ¸öÔÚǰ¶ËÈçºÎʵÏֱȽϺã¬ÐÔÄÜÓÅÏÈ
ÎÒµÄ˼·ÊÇ£º1.ǰ¶Ëͨ¹ýajax¼¼Êõ¸ôÒ»¶Îʱ¼äÇëÇóһϺǫ́£¬²é¿´µ±Ç°µÇ¼ÈËÊÇ·ñÓÐÏûÏ¢£¬Èç¹ûÓУ¬ÔòÏÔʾÒþ²ØµÄ ......
ËÑË÷ÁËһϣºhttp://so.csdn.net/bbsSearchResult.aspx?q=jsp+%e4%bc%a0%e9%80%92&p=1£¬Ã»Óз¢ÏÖÄÜÓõġ£ÒòΪÎÒÊdzõѧjsp£¬Òò´ËÓÐЩҲÐíÄÜÓã¬Ö»ÊÇÎÒ¿´²»Ã÷°×£¿
Ò»¡¢ÎÒµÄÇéÐΣº
a.html ͨ¹ý<form action=&q ......
×î½üÓöµ½Ò»Ð© jspÒ³ÃæµÄȡֵ¡£Ã»Óмû¹ý¡£Ò²²»ÖªµÀʲôÒâ˼¡£ÄÄλ´óÏÀ¸øÎÒ˵˵ ȡֵµÄÖÖÀàºÍ·½·¨°¡
request.getParameter£¬»òÕßÓÃbean£¬¼´ÔÚjspÒ³ÃæÖÐÉùÃ÷jsp:usebeanÖ®ºó¿ÉÒÔÖ±½Ósetproperty »òÕßgetproperty¡£Ò ......
JSPÉú³ÉHTML¾²Ì¬Ò³Ãæ
1.ÓдúÂëµÄÅóÓÑÌù¸ö´úÂë
2.ÓеĺõÄÉú³É·½°¸Ëµ¸ö·½°¸
¹ýÄê·Å¸öÅÚ ×£ºØ×£ºØ£¡
JSPÉú³É¾²Ì¬Ò³Ã棿£¿£¿
»¹ÒªÓ÷½°¸£¿£¿£¿
²»Ã÷°×
ÒýÓÃ
JSPÉú³É¾²Ì¬Ò³Ã棿£¿£¿
»¹ÒªÓ÷½°¸£¿£¿£¿
²»Ã÷ ......