Another Portlet. Form submission using LifeRay MVC. POC 1

Came around a task to raise Jira tickets and view existing Jira tickets using Liferay Framework. Started with creating two POC.

First POC is Portlet with Task submission that goes directly into schema on MYSql using Liferay MVC.

Covered:
Liferay Portlet Form
Liferay MVC Data Layer with MYSql

Project structure screenshot at the bottom.
Lets Create a new Portlet named IssueLiferayMVC.
Follow link to create one. Creating a new Portlet

Lets create jsp form containing inputs related to a task/Bug. Make the entries by replacing view.jsp with raise_issue.jsp

Continue reading

Switching from HSQL to MySQL or any other DB in Liferay

Lets Switch from existing HSQL to MySQL.

Simplest way of switching database is to use a property file named portal-ext.properties.Way to override the existing features can be written into this file.

Go to Liferay tomcat directory->WEB-INF->classes. Their you find the file portal-ext.properties.
In case you don’t find it,create a new file named portal-ext.properties.
Add the below database configuration parameters to run LFRay on MySQL.

    #
    # MySQL
    #
    jdbc.default.driverClassName=com.mysql.jdbc.Driver
    jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    jdbc.default.username=root
    jdbc.default.password=

Continue reading