皮啊 我的一打開(kāi)就是在線(xiàn)3個(gè) 假的瀏覽器???
2018-01-20
在原來(lái)類(lèi)的基礎(chǔ)上多實(shí)現(xiàn)一個(gè)借口不就好了嗎。。
2018-01-20
我這在導(dǎo)航欄url傳參的話(huà)并不會(huì)創(chuàng)建session
2018-01-20
1.先 使用MyHttpSessionListener 接口 HttpSessionListener
每次新建一個(gè)session 獲取sessionId 統(tǒng)計(jì)在線(xiàn)人數(shù)
2.MyServletRequestListener 接口 ServletRequestListener
每打開(kāi)一個(gè)頁(yè)面 即創(chuàng)建
通過(guò)request獲取ip地址 創(chuàng)建時(shí)間 保存在userList
3.SessionUtil 判斷兩個(gè)sessionId是否相同
4.將userList保存在ServletContext(application)
每次新建一個(gè)session 獲取sessionId 統(tǒng)計(jì)在線(xiàn)人數(shù)
2.MyServletRequestListener 接口 ServletRequestListener
每打開(kāi)一個(gè)頁(yè)面 即創(chuàng)建
通過(guò)request獲取ip地址 創(chuàng)建時(shí)間 保存在userList
3.SessionUtil 判斷兩個(gè)sessionId是否相同
4.將userList保存在ServletContext(application)
2017-12-28
我覺(jué)得講的挺好的,馬馬虎虎也聽(tīng)懂了,特別難受這個(gè)老師的context總是讀成content,我是個(gè)女的,有點(diǎn)兒矯情
2017-12-15
我覺(jué)得講的挺好的,馬馬虎虎也聽(tīng)懂了,特別難受這個(gè)老師的context總是讀成content,我是個(gè)女的,有點(diǎn)兒矯情
2017-12-15
使用注解 添加這一句@WebListener ,就不需要在web.xml中進(jìn)行配置
2017-12-12
request.setAttribute();
request.getSession().setAttribute();
request.getServletContext().setAttribute();
這樣就可以獲得。
老師的request.getSession().getServletContext().setAttribute();也行
request.getSession().setAttribute();
request.getServletContext().setAttribute();
這樣就可以獲得。
老師的request.getSession().getServletContext().setAttribute();也行
2017-12-06
我覺(jué)得老師講的不錯(cuò)啊,沒(méi)聽(tīng)懂可能是不太適合吧,可以先看看基礎(chǔ)的課程
2017-11-17