I've attached a zipped NetBeans project that contains the worked exercises combined into a single project.
To use this project, you will need to first open the Week8 project. Then once the main project is open, you can open each of the sub-projects by right clicking on the modules inside the "Java EE Modules" section of the project.
You should open all of the sub-projects and then right click on Week8 and select "Clean and Build".
I encourage you to attempt the problems yourself before "peeking" at the solutions.
The solutions I've provided are just one of many possible ways to achieve the same effect. If your code is different, but still works, it doesn't necessarily mean that you are "wrong". In fact, your solution may be better than the ones that I have provided. I suggest looking at the differences and understanding why you and I have made different design choices.
I've added an index.xhtml page to the Week8-war project that will take you to each of the solutions. To choose between running the application client and the web app, you will need to right click on the Week8 project, choose Properties, select the "Run" category and then change the Client Module.
Note that you should NOT run the Week8-war project directly. You should deploy or run the Week8 project only.