java2db

How to Connect to Oracle from Liferay portlet ( Java Liferay and Oracle integration )



Liferay is a open source and free enterprise portal . It is also described as a web application framework or content management framework . In this post we explained that how to Connect to Oracle from Liferay portlet .


Connect to Oracle from Liferay portlet Basic Requirements  to Connect to Oracle from Liferay portlet :

Java 8 (Download).
Oracle (Download).

 

Use  https://www.liferay.com/downloads/  url to download the liferay bundle.

After successful download , we will get the below list together.

Connect to Oracle from Liferay portlet Tomcat web server
Connect to Oracle from Liferay portlet Eclipse Neon
Connect to Oracle from Liferay portlet liferay-plugins-sdk-7.0
Connect to Oracle from Liferay portlet liferay-ce-portal-7.0-ga3  (This folder the tomcat server will be there).

 

How to Connect Liferay 7 to PostgreSQL Steps to Connect to Oracle from Liferay portlet :

Connect to Oracle from Liferay portlet Step 1 :

Add the liferay-plugins-sdk-7.0 to eclipse IDE

 

 

Connect to Oracle from Liferay portlet Step 2 :

Create a Liferay plug in project form File -> New -> Liferay Plugin Project.

 

How to Connect Liferay 7 to PostgreSQL
Jsp , struts 2 example in eclipse Step 3:

Create a portlet java class   (Right click on src folder -> New – > Liferay Portlet)  and  jsp (under docroot folder)  file . See the entire directory structure below.
How to Connect Liferay 7 to PostgreSQL

 

 

EmployeeSubmitForm.java

 

 

view.jsp

This class is used to connect to the Oracle from Liferay portlet.

 

DBUtil.java

 

Jsp , struts 2 example in eclipse Step 4:

Run the tomcat server to test the application.

Jsp , struts 2 example in eclipse

 

 

Once we click addDetails button , our portlet will insert form data as a new record in oracle database.

 

Jsp , struts 2 example in eclipse




Related Posts :
How to Connect Liferay 7 to PostgreSQL ( Java Liferay portlet and PostgreSQL integration )
How to call C# .Net WCF web service in java SOAP client ( Visual Studio 2013 )
How to call PHP RESTful web service in java client
How to call java SOAP web service in php ( php web service client )
Solution to SSLHandshakeException (skip the certificate for Java and LDAP bind)
Java RESTful web service example in maven using JAX-RS
RESTful web service example in java using JAX-RS
Call database in Jsp (Access Oracle , MySQL , PostgerSQL ,Db2 from Jsp)
   [will not be published]



^ <