You have just hijacked your own
thread, changing the subject halfway through.
One of the frustrating aspects of portlet development is the fact that the portal only allows a portlet to have one controller, essentially, the class you create that extends GenericPortlet. What happens when you have a bunch of different views? This one portlet turns into a front controller, and becomes bulky and awkward, not to mention difficult to maintain.
Trust me, you're not the first one to run into this problem.
For relatively simple portlets that are used for mild navigation, and largely the display of content, a class that extends GenericPortlet is great. For more complex, wizard-like portlets, or portlets with many navigational states, you have to start looking at moving towards a framework portlet.
People have worked hard to port both the
Struts and the
JSF framework to a portal environment. IMHO, JSF is much easier to get working as a portlet than Struts, and that's coming from a long-time struts developer. But, with these frameworks, you can create a multi-page, multi-state portlet as though you were creating a complex, web based application. Plus, these frameworks also provide error handling, custom tag libraries, error feedback, memento
patterns, and all sorts of other great things.
I've actually just written a few tutorials on how to get a Struts portlet or a JSF portlet to work in a JetSpeed2, JSR-168 environment. If that's the route you think you're going to have to go down, let me know, and I can get you a copy of the tutorials.
Let me know what you think.
-Cameron McKenzie