Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet + jdbc

 
Archu Joshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody
am doing a project for online opinion poll where i need to count votes from users & user is allowed to vote only once in a session .i am using servles & jdbc connections for this project.
can any body tell me how to go about it since i am facing a big problem & my submission is on 18th of this month.
after counting i have to display a graph also & i do't know how to do that.
pls help soon
bye
archuu
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Boy that's a tight deadline.
To ensure single-voting you will need some sort of login system, so you can verify who a voter is before they vote. Most servers should have something like this describedin their help files. Once you know who a voter is, you need to store the fact that they have voted. How you do this depends on the number of users and the duration of the poll. For small numbers and/or short polls, you night as well use a Hashtable or Set stored in memory. For larger or longer duration poll s you really need to use a database.
As for displaying a graph, it depends on what sort of output you need. If you are using an application or applet you canjust use the AWT or SWING tools to draw on the screen, or buy in one of the many Java graphing packages. If you need to produce a saveable graphic you will either need to draw your own GIF, or save the data in a format which can be used to produce a graphic (say CSV to give to Excel).
Good luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic