JavaServer Pages (JSP)

Practice for Week 3

I've attached a zipped NetBeans project that contains all the worked exercises combined into a single project.

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.html page that will take you to each of the solutions (you can see it by just clicking the run button [green triangle] in NetBeans).

I've attached one possible solution to the challenge problem. It is a zipped NetBeans project folder.

Please note that the challenge problem was very open-ended. My solution is just one of many possible design choices.

What I've proposed has many limitations and weaknesses. In addition, I would want to add some user input validation to improve security. It certainly isn't suitable for deployment into a production environment.

If you found a clever solution to some part of the challenge or if you have any questions, you are welcome to discuss it on the "Discussion Board" or in the next Lab session.

In the project, I've included two sample applications built using the MVC framework (in demo.greeting and demo.todo packages). You can access both of them by running index.html and viewing each of the solutions. The views are stored in the WEB-INF folder (you'll find them in the "Web Pages" section of the Netbeans project).