佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > jsp計數(shù)器代碼

jsp計數(shù)器代碼

熱門標(biāo)簽:美圖手機(jī) 網(wǎng)站文章發(fā)布 檢查注冊表項(xiàng) 智能手機(jī) 呼叫中心市場需求 鐵路電話系統(tǒng) 銀行業(yè)務(wù) 服務(wù)器配置
!--
JSP-Hitcounter counts sessions.
Copyright (C) 2000 Jesper Schmitz Mouridsen.
Visit www.webappcabaret/jsm2/webapps.jsp?find=jsphcs for more info.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.opensource.org/licenses/gpl-license.html for more details
-->


%

BufferedReader inf = new BufferedReader(new FileReader("/path/to/counter.txt"));
int tmp = Integer.parseInt(inf.readLine());
int i=0;

try {

i = Integer.parseInt(request.getSession().getValue("tal").toString());
} catch (NullPointerException t) {i=0; }

if (i==0) {
tmp++;

PrintWriter outf = new PrintWriter(new BufferedWriter(new FileWriter("/path/to/counter.txt")));
outf.println(tmp);
outf.close();
inf.close();
request.getSession().putValue("tal", "1");
}

BufferedReader inf2 = new BufferedReader(new FileReader("/path/to/counter.txt"));
%>
%
String zeroes="";
String hits = inf2.readLine();
inf2.close();
for (int t=0; t 8-hits.length(); t++) {
zeroes=zeroes+"0"; }
out.println(zeroes + hits);
%>

您可能感興趣的文章:
  • 使用JavaScript制作一個簡單的計數(shù)器的方法
  • jsp網(wǎng)頁計數(shù)器實(shí)現(xiàn)示例
  • 一個簡單的網(wǎng)站訪問JS計數(shù)器 刷新1次加1次訪問
  • javascript下計數(shù)器每秒自動加1
  • 用JAVASCRIPT幫我寫個計數(shù)器
  • js計數(shù)器代碼
  • jsp計數(shù)器制作手冊
  • jsp計數(shù)器制作
  • 一個可以防止刷新的JSP計數(shù)器
  • JavaScript實(shí)現(xiàn)計數(shù)器基礎(chǔ)方法

標(biāo)簽:上海 沈陽 樂山 滄州 長治 新疆 河南 紅河

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《jsp計數(shù)器代碼》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    咸宁市| 滨州市| 双牌县| 库尔勒市| 姚安县| 饶河县| 延边| 济宁市| 台前县| 安塞县| 武邑县| 文昌市| 诸城市| 龙山县| 汝南县| 垫江县| 海门市| 昆明市| 江口县| 正宁县| 乐都县| 苍山县| 沾益县| 廊坊市| 敦煌市| 广安市| 荔浦县| 遵义县| 拉萨市| 云梦县| 石家庄市| 商洛市| 定远县| 民乐县| 苗栗市| 滦南县| 东宁县| 岳普湖县| 衡东县| 日喀则市| 延津县|