Jsoup小Demo

Jsoup小Demo

  

public class JsoupUtil {

    public void parseWangYi() {

        Document doc = null;
        try {
        	//eg1:解析百度音乐
            doc = Jsoup.connect("http://list.mp3.baidu.com/top/singer/A.html").get();
            Element singerListDiv = doc.getElementsByAttributeValue("class", "content").first();
            Elements links = singerListDiv.getElementsByTag("a");

            for (Element link : links) {
                String linkHref = link.attr("href");
                String linkText = link.text().trim();
                System.out.println(linkHref + "==============" + linkText);
            }

            //eg2:解析万年历    可以根据输入的日期,生成相应的阴历万年历解析
          Document docs = Jsoup.connect("http://www.nongli.com/item4/index.asp?dt=2015-02-26").get();
          Element infoTable = docs.getElementsByAttributeValue("class", "table002").first();
          Elements tableLineInfos = infoTable.select("tr");
          for (Element lineInfo : tableLineInfos) {
              String lineInfoContent = lineInfo.select("td").last().text().trim();
              System.out.println("jsoup is :" + lineInfoContent);
          } 

        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}

  

拿到的结果:

 http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=A+BOYS%C0%D6%B6%D3==============A BOYS乐队
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=A+ONE==============A ONE
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=A-SHOW==============A-SHOW
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=A.J.Alex==============A.J.Alex
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=A4==============A4
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=AFI==============AFI
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=AJerks==============AJerks
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=AM+%C0%D6%CD%C5==============AM 乐团
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=AOK==============AOK
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=ASOS==============ASOS
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=AY%B0%AE%C0%D6%B9%AB%C9%E7==============AY爱乐公社
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Aaron+Carter==============Aaron Carter
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Air+Supply==============Air Supply
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Airbag==============Airbag
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Ak-47==============Ak-47
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Akon==============Akon
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Alicia+Keys==============Alicia Keys
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Alizee==============Alizee
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Alt+Senior==============Alt Senior
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Andrea+Bocelli==============Andrea Bocelli
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Angela==============Angela
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Art+Pepper==============Art Pepper
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=At17==============At17
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=August+band==============August band
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=Avril+Lavigne==============Avril Lavigne
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=ado==============ado
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=anida==============anida
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2Bert==============阿Bert
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B1%A6==============阿宝
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B1%AC==============阿爆
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B1%BE==============阿本
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B2%BC%C1%D0%D7%C8%C4%F9==============阿布列兹涅
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B2%C5==============阿才
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B5%C2==============阿德
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B5%C6==============阿灯
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B5%DC==============阿弟
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B5%DC%D7%D0==============阿弟仔
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B6%C5==============阿杜
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B6%E4==============阿朵
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B8%A3==============阿福
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B8%F1==============阿格
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B9%F3==============阿贵
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%B9%FB==============阿果
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%BA%C6==============阿浩
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%BB%AA==============阿华
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%BC%AA%D7%D0==============阿吉仔
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%BC%D1==============阿佳
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%BC%D1%D7%E9%BA%CF==============阿佳组合
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C0%B3%C0%D6%B6%D3==============阿莱乐队
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C0%BC.%B4%EF%CD%DF%D7%BF%C2%EA==============阿兰.达瓦卓玛
#==============
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C0%CA==============阿朗
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C0%EF%C0%C9==============阿里郎
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C0%F6%C2%EA==============阿丽玛
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C1%C1==============阿亮
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C1%FA%D5%FD%EE%B8==============阿龙正罡
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C2%B3%B0%A2%D7%BF==============阿鲁阿卓
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C2%D6==============阿轮
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C3%A8%B0%A2%B9%B7==============阿猫阿狗
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C3%C3%C3%C3==============阿妹妹
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C4%BE==============阿木
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C4%BE%B9%C5%E3%B6==============阿木古愣
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C4%C2%C2%A1==============阿穆隆
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C5%A3==============阿牛
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C7%BF==============阿强
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C7%C4==============阿悄
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C7%DF==============阿沁
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C7%E5==============阿清
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C8%D5%B2%BC%BD%DC==============阿日布杰
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C8%E3%C4%C8==============阿茹娜
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%C9%A3==============阿桑
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%CC%A9==============阿泰
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%CE%A8==============阿唯
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D0%C5==============阿信
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D1%87==============阿?
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D1%C5==============阿雅
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D2%F7%C7%D9==============阿吟琴
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D3%C2%D4%F3%C8%C3==============阿勇泽让
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D3%D7%B6%E4==============阿幼朵
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D4%C6%B8%C2==============阿云嘎
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D5%FD==============阿正
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%D8%F4==============阿佤
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A2%F4%C2==============阿袈
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A5%DF%BA%C0%D6%B6%D3==============哎吆乐队
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%A7%CD%AC%CB%BF==============哀同丝
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%B3%C9==============艾成
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%B6%FB%BF%CF==============艾尔肯
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%B8%E8==============艾歌
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%BE%B4==============艾敬
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%BE%FB%CE%B0==============艾钧伟
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%BF%C9==============艾可
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%C0%F2%C9%AF==============艾莉莎
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%C1%D5==============艾琳
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%C3%CE%C3%C8==============艾梦萌
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%C7%E7%C7%E7==============艾晴晴
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%CB%B9%BF%A8%B6%FB==============艾斯卡尔
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%D0%C4==============艾心
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%D3%EA==============艾雨
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AC%E9%F3%C2%FC==============艾轶曼
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AE%B4%F7==============爱戴
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AE%BB%DB%C4%C8==============爱慧娜
#==============
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%AE%C0%D6%CD%C5==============爱乐团
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%B0%D9%BB%DB==============安百慧
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%B2%AE%D5%FE==============安伯政
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%B5%C2%D7%F0==============安德尊
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%B5%CF==============安迪
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%B9%C8==============安谷
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%BF%B5==============安康
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%C6%DF%EC%C5==============安七炫
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%C9%D9%D3%EE==============安少宇
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%CA%D2%C4%CE%C3%C0%BB%DD==============安室奈美惠
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%CC%CE==============安涛
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D0%F1==============安旭
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D2%D4%D0%F9==============安以轩
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D3%D6%E7%F7==============安又琪
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D3%EB%C6%EF%B1%F8==============安与骑兵
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D4%DA%D0%F1==============安在旭
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%D6%BE%BD%DC==============安志杰
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%E7%F7%B6%F9==============安琪儿
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%E7%FA==============安琥
http://mp3.baidu.com/m?rf=top-singer&tn=baidump3&ct=134217728&lm=-1&word=%B0%B2%F6%A9==============安雯
#==============
jsoup is :正月(小)初八 星期四 双鱼座
jsoup is :乙未年 生肖属羊 戊寅月 癸酉日
jsoup is :纳采 订盟 祭祀 祈福 安香 出火 修造 出行 开市 移徙 入宅 动土 安葬 破土
jsoup is :安床 作灶 造船 会亲友
jsoup is :除神 阴德 鸣犬
jsoup is :五离 天吏 五虚 元武
jsoup is :房床门外西南
jsoup is :剑锋金 危执位
jsoup is :冲兔(丁卯)煞东
jsoup is :癸不词讼理弱敌强 酉不宴客醉坐颠狂

 

时间: 2024-09-20 19:10:31

Jsoup小Demo的相关文章

基于BaseAdapter的Listview小Demo

ListView是Android开发中比较常用的控件, 其中适配器模式可以选择: ArrayAdapter:简单易用,通常用于将数组或者List集合的读个包值封装成多个列表项 SimpleAdapter:其实功能很强大将数组或者List集合的读个包值封装成多个列表项 SimpleCursorAdapter:与SimpleAdapter基本类似只是用于包装Cursor提供的数据 BaseAdapter:通常用于被扩展,扩展BaseAdapter可以对各列表项进行最大的定制 而且ListView组件

ofbiz做一个小demo,配置好了之后,在页面上跑。报404错误,请问该怎么解决

问题描述 ofbiz做一个小demo,配置好了之后,在页面上跑.报404错误,请问该怎么解决 ofbiz做一个小demo,配置好了之后,在页面上跑.报404错误 求大神指点

thrift的小demo谁能帮我写一个java和java传值就好

问题描述 thrift的小demo谁能帮我写一个java和java传值就好 thrift的小demo谁能帮我写一个java和java传值就好最好推荐几个文档谢谢 解决方案 谢谢你们了求助 啊 在不在 啊 解决方案二: qq 420914273我帮你写吧,大家都学生一起 帮忙

html5掷骰子的小demo

原文 html5掷骰子的小demo 代码如下: 1 <!DOCTYPE> 2 <html> 3 <title>柯乐义</title> 4 <head> 5 <script> 6 var leftX = 150; 7 var topY = 100; 8 var diceX = 80; 9 var diceY = 80; 10 var dotR = 4; 11 var count = 0; 12 var lastNum = 0; 13 v

spring-struts2+mybatis+sprin一个小demo总是不能实例化

问题描述 struts2+mybatis+sprin一个小demo总是不能实例化 public class RegisterAction { private RegisterDao registerDao; private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this

求一个用于图片缩小消失小demo

问题描述 求一个用于图片缩小消失小demo 需求是:不管我点击屏幕的哪里除下imageview上图片都要缩小消失 解决方案 那就先弄个控件占满整个屏幕,然后监听点击事件,然后在里面调用函数让这个imageview消失 解决方案二: 网页还是什么?网页 document.onclick=function(){document.getElementById('imageview').style.display='none'}

Android实现登录小demo

       安卓,在小编实习之前的那段岁月里面,小编都没有玩儿过,如果说玩儿过,那就是安卓手机了,咳咳,敲登录的时候有种特别久违的熟悉,这种熟悉的感觉就和当时敲机房收费系统一样,那叫一个艰难啊,不过小编相信,在小编的IT成长之路上,正是因为有了这些艰难险阻陪伴着小编一起成长,才让小编更加勇敢坚强,勇敢的面对一个又一个bug,坚强的敲完一行行代码,经过了几天的研究登录一条线的功能已经实现,现在小编就来简单的总结一下,还请小伙伴们多多指教哦`(*∩_∩*)′!         总的来说Androi

小Demo大知识-通过控制Button移动来学习Android坐标

今天分享一个简单的Demo.Demo实现的功能就是,用鼠标点中button的时候,然后拖动Button.这时候Button会根据你鼠标的移动而移动,同时,你鼠标点中的Button的位置也不会改变.比如你点在Button的左上角,那移动的时候.鼠标还是在Button的左上角 一言不合上效果图 大家不要介意上面那么模糊的gif图,毕竟我是用手机拍的.(介意你又能拿我怎么办.哈哈) 我们先来打个预防针,先学习基本的知识点: 涉及到的方法一共有下面几个: view获取自身坐标:getLeft(),get

http服务器小demo的问题

问题描述 为什么通过浏览器访问,我的server会接受2次连接,有时候是3次连接?但是我看页面上的请求只发了一次啊另外我自己用socket去访问server的话,只会有一次accept,这是为什么?publicclassSimpleHttpServerIO{privateServerSocketChannelserverSocketChannel;privateCharsetcharset=Charset.forName("UTF-8");publicSimpleHttpServerI