Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ishan Sahore
Hitting the database in standard portlet
August 9, 2012 2:59 AM
Answer

Ishan Sahore

Rank: Junior Member

Posts: 56

Join Date: April 25, 2012

Recent Posts

Hi all,

I want to know if we can access the MySQL database with code written in a standard portlet(made using eclipse) to make the portlet dynamic so that data is fetched from the database and displayed in the portlet.

Any help is appreciated.

Thanks,
Ishan
Raja Nagendra Kumar
RE: Hitting the database in standard portlet
August 9, 2012 3:04 AM
Answer

Raja Nagendra Kumar

Rank: Expert

Posts: 484

Join Date: March 1, 2006

Recent Posts

Portlet can use external database like any normal JSP pages..

However it is advised to use Liferay expando framework http://www.liferay.com/community/wiki/-/wiki/Main/Expando.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
David H Nebinger
RE: Hitting the database in standard portlet
August 9, 2012 5:41 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 12082

Join Date: September 1, 2006

Recent Posts

Raja Nagendra Kumar:
However it is advised to use Liferay expando framework http://www.liferay.com/community/wiki/-/wiki/Main/Expando.


What? That doesn't answer the OP's question...

Yes you can access data from the database. Always use Service Builder to access the database though, and never your own connection/sql.