This project is deprecated but you can browse the source for a JVM language based web project (3/10/2011 Berlin Brown). This project shows how to build a reddit or craigslist style fullstack web application. Code is all open source, use per the license.
berlinbrown/openbotlist
Botlist contains an open source suite of software applications for social bookmarking and collecting online news content for use on the web.
Java