::How to do Rating Coding in JSP

hello...anyone can help me how to do rating coding using star(like Rating in youtube)..i really don't know how to do..
:: user must login before do rating. Rating base on user not IP address.
Plz help me..