whats the best way of preventing someone from voting twice? How do i get the users ip address? What if they are on a large network? will everyone on that network show the sa
To get the IP of a client behind a router/firewall you can use
request.getHeader("X-FORWARDED-FOR").
The X-Forwarded-For (XFF) HTTP header is a de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. http://en.wikipedia.org/wiki/X-Forwarded-For
Keep in mind though, that this value can be changed by the proxies between you and the client. Though it should be the correct IP.