For basic Servlet examples, and in order to run any JEE webapp, download Tomcat , you'll get some example webapps provided with it...
If you're interested in more advanced web applications, you'll soon discover that there are more 'frameworks' and tools out there than one can choose...
Here, I'm just dropping some common names :
- Struts (old one, MVC model based on a Servlet Controler...)
- ORM tools : Hibernate, Ibatis... With theses - If you use common SQL - you can switch from any database to another quite quickly !
- Spring, originally a IoC container, turned into a whole JEE alternative... a whole platform with modules for MVC, DataBase Connection, AOP, User security, anything... ;-)
if you're interested in getting a overview of an application using different frameworks (these and others) you can give a try to Appfuse...
It can be an interesting step after the 'hello world', a more complex but also more realistic application to dive into...