Try this sample. I found it the best practice for liferay JSR168-286 or whatever portlets, 'cause most of its portlets is based on this architecture.
www.liferay.com/.../2030606?_98_redirect=%2Fweb%2Fguest%2Fdownloads%2Fcommunity_plugins%2F-%2Fsoftware_catalog%2Fproducts%3F_98_tabs1TabsScroll%3D%26_98_keywords%3DStruts%26_98_type%3D
and Try Netbeans IDE, it makes the things simpler.
if you need more help, send an email to me. I'm kinda expert about liferay.