u should familar with Java SpecificationRequest(JSR168)...with this spec. u can write u'r portlet's...for connection to database also u can use from jdbc orORM Tools...