當前位置:首頁 » 操作系統 » jsp投票源碼

jsp投票源碼

發布時間: 2022-05-25 17:53:32

Ⅰ 用JSP做一個投票系統,功能描述:1 投票功能模塊 2系統維護模塊 3.統計數據報表模塊

在統計數據報表這塊建議用飛揚報表, java 編寫,無縫嵌入。

Ⅱ 在線投票系統 用jsp做的 希望有詳細的步驟過程、源代碼、圖片 萬分感謝啦

你這是個小項目,做起來也不難,就是費時間,你要是懸賞分給力的話,可以坐坐,我現在花時間做了,啥都沒有,不值!

Ⅲ 我在網上下載的Jsp在線投票系統里的src文件夾是空的

src里放的是java源碼。。他要是沒用到java文件就無所謂了,要是用到java文件,class文件給你了(class文件在web-inf的classes里),也沒有問題,要是用到了java文件,但是沒給你類src里又沒有class文件,就不能用了。
資料庫也可以直接在jsp里訪問的。
能不能運行你試一下不就知道了。。

Ⅳ JSP編程——投票系統

http://www.blueidea.com/download/proct/2003/1423.asp
這個是Flash投票系統

http://www.my3q.com/index.phtml?strForceLang=ch
這個雖然不是Flash的,但不錯,一起推薦下

Ⅳ jsp投票系統

方法一 在 appliction 中藏一個值,可以 系統年月日作為鍵,值為計數器,每次投票去查看下當天日期的鍵下的值是否到達50 ,沒有到達計數器+1,進行投票,到達了則不執行投票.

方法二 在 appliction 中藏一個值,可以 固定鍵,值為計數器,每次投票去查看下當天日期的鍵下的值是否到達50 ,沒有到達計數器+1,進行投票,到達了則不執行投票. 每天0:00 將值設置為0

Ⅵ 怎麼用jsp實現一個簡單的投票系統

要簡單的,就:
搞幾個選項,然後提交數據,在得到提交數據時,把數據存入一個.txt文件(反正是簡單,也不必用資料庫了,直接用IO輸入輸出流,將投票結果保存在文本文件中),寫幾個數字(有幾個選項就寫幾個數字,並用","等標准符號隔開),查看投票結果,讀出文本中的一串數字,並用split()分隔取值。

Ⅶ jsp投票系統求源代碼!可以連資料庫的!

<p style=line-height: 150%><SPAN style="FONT-SIZE: 12px"><STRONG>這是用文本文件作為存儲載體的投票系統:</STRONG></SPAN>
<p style=line-height: 150%><SPAN style="FONT-SIZE: 12px"><STRONG>vote.java:</STRONG></SPAN>
<SPAN style="FONT-SIZE: 12px"><STRONG></STRONG> <p style=line-height: 150%>
// Java Document
package vote;
import java.io.*;
import java.util.*;
public class vote extends Object
{
public String filePath="";
public int n;
private File voteFile;
private BufferedReader fileRead;
private PrintWriter fileWrite;
public String systemMessage="";
private String voteStr[]=new String[10];
public int voteNum[]=new int[10];
public void createFile()
throws FileNotFoundException
{
voteFile=new File(filePath);
if(!voteFile.exists())
{
fileWrite=new PrintWriter(new FileOutputStream(filePath));
for(int i=0;i<n;i++) fileWrite.println("0");
fileWrite.close();
}
}
public void writeFile()
throws FileNotFoundException
{
fileWrite=new PrintWriter(new FileOutputStream(filePath));
for(int i=0;i<n;i++)
{
fileWrite.println(voteNum[i]);
}
fileWrite.close();
}
public void readFile()
throws FileNotFoundException
{
fileRead=new BufferedReader(new FileReader(filePath));
for(int i=0;i<n;i++)
{
try
{voteStr[i]=fileRead.readLine();
}
catch(IOException f)
{
voteStr[i]="0";}
voteNum[i]=Integer.parseInt(voteStr[i]);
}
try
{
fileRead.close();
}
catch(IOException d)
{
systemMessage=d.toString();
}
}
}
<p style=line-height: 150%><SPAN style="LINE-HEIGHT: 15pt"><SPAN style="FONT-SIZE: 12px"><STRONG>vote.jsp:</STRONG>

<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@ page import="java.util.*"%>
<%@ page import="java.lang.*"%>
<%@ page import="java.io.*"%>
<jsp:useBean id="vote" scope="request" class="vote.vote"/>
<%
String vote1=request.getParameter("lang");
vote.n=4;
vote.filePath="vote.txt";
vote.createFile();
vote.readFile();
if(vote1.compareTo("0")==0)
vote.voteNum[0]++;
if(vote1.compareTo("1")==0)
vote.voteNum[1]++;
if(vote1.compareTo("2")==0)
vote.voteNum[2]++;
if(vote1.compareTo("3")==0)
vote.voteNum[3]++;
vote.writeFile();
%>
<script language="javascript">
alert("感謝你投了寶貴的一票");
self.location="index.jsp";
</script></SPAN></SPAN>
<p style=line-height: 150%><STRONG> </STRONG><SPAN style="LINE-HEIGHT: 15pt"><SPAN style="FONT-SIZE: 12px"><STRONG>see.jsp:</STRONG>

<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@ page import="java.util.*"%>
<%@ page import="java.lang.*"%>
<%@ page import="java.io.*"%>
<jsp:useBean id="vote" scope="request" class="vote.vote"/>
<%
String vote1=request.getParameter("lang");
vote.n=4;
vote.filePath="vote.txt";
vote.createFile();
vote.readFile();
int total=0;
float voteFlo[]=new float[5];
for(int i=0;i<4;i++) total+=vote.voteNum[i];
for(int i=0;i<4;i++) voteFlo[i]=150*((float)vote.voteNum[i]/(float)total);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看調查</title>
<link href="t1.css" rel="stylesheet" type="text/css">
</head>
<body>

<table width="30%" border="0" class="t1">
<tr>
<td colspan="2"><div align="center">調查結果</div></td>
</tr>
<tr>
<td width="18%">JSP</td>
<td width="82%"><img src="bar.gif" width=<%=voteFlo[0]%> height=8> <%=vote.voteNum[0]%></td>
</tr>
<tr>
<td>ASP</td>
<td><img src="bar.gif" width=<%=voteFlo[1]%> height=8> <%=vote.voteNum[1]%></td>
</tr>
<tr>
<td>PHP</td>
<td><img src="bar.gif" width=<%=voteFlo[2]%> height=8> <%=vote.voteNum[2]%></td>
</tr>
<tr>
<td>其他</td>
<td><img src="bar.gif" width=<%=voteFlo[3]%> height=8> <%=vote.voteNum[3]%></td>
</tr>
<tr>
<td colspan="2"><div align="center"><a href="javascript:window.close();">關閉窗口</a></div></td>
</tr>
</table>
</body>
</html>
</SPAN></SPAN>
<p style=line-height: 150%><SPAN style="LINE-HEIGHT: 15pt"><SPAN style="FONT-SIZE: 12px"><SPAN style="LINE-HEIGHT: 15pt"><SPAN style="FONT-SIZE: 12px"><STRONG>index.jsp:</STRONG>
</SPAN></SPAN>
</SPAN></SPAN> <p style=line-height: 150%><SPAN style="LINE-HEIGHT: 15pt"><SPAN style="FONT-SIZE: 12px"><%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票</title>
<link href="t1.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript">
function cw()
{window.open("see.jsp","mywindow","toolbar=no,left=150,top=200,width=270,height=350,menubar=no,systemMenu=no");
}
</script>
<body>
<table width="15%" height="250" align="left">
<tr>
<td><form name="form1" method="post" action="vote.jsp">
<table width="100%" height="250" border="1" align="center" bordercolor="#9966CC" class="t1">
<tr>
<td><div align="left">你所使用的開發語言</div></td>
</tr>
<tr>
<td><input type="radio" name="lang" value="0">
JSP</td>
</tr>
<tr>
<td><input type="radio" name="lang" value="1">
ASP</td>
</tr>
<tr>
<td><input type="radio" name="lang" value="2">
PHP</td>
</tr>
<tr>
<td><input type="radio" name="lang" value="3">
其他 </td>
</tr>
<tr>
<td><div align="center">
<input name="vote" type="image" src="poll.gif" width="40" height="20" border="0">
<a href="javascript:cw()"><img src="see.gif" width="40" height="20" border="0"></a></div></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
</SPAN></SPAN></SPAN>

Ⅷ 用jsp做網上投票系統 代碼

網上投票系統
jsp完成
伺服器:Tomcat
開發工具:myeclipse or eclipse

Ⅸ 網站投票系統源代碼(java web)

http://www.onegreen.net/code/HTML/10633.html 你看看這個行不行 如果行的話 請採納

Ⅹ 求基於jsp+oracle的投票系統 網站+源代碼+資料庫 郵箱[email protected] 感激啊

哎 20分 真心沒有

熱點內容
學cnc數控編程 發布:2024-10-27 11:04:56 瀏覽:226
mallat演算法 發布:2024-10-27 11:03:57 瀏覽:33
講腳本 發布:2024-10-27 10:47:54 瀏覽:713
存儲免疫細胞 發布:2024-10-27 10:46:56 瀏覽:493
粉標溯源碼 發布:2024-10-27 10:44:28 瀏覽:139
網吧伺服器如何搭建 發布:2024-10-27 10:27:49 瀏覽:391
安卓手機如何設置不讓玩王者榮耀 發布:2024-10-27 10:27:43 瀏覽:762
沒有配置的游戲怎麼玩 發布:2024-10-27 10:25:32 瀏覽:431
c語言好看 發布:2024-10-27 10:14:25 瀏覽:604
java寫入數組 發布:2024-10-27 10:06:59 瀏覽:178