test
My suggestion is that you use a webframework like JSF. It will help you organize your application in terms of views and controllers. If you write a big portlet it will be a big mess :)