How to add new struts portlet action hook in liferay 7? - liferay-7

How to register new struts-action path in liferay 7 ? and how to call that strutsportletAction class from jsp in liferay 7 ?

Hi here is a sample how you can do it
https://github.com/liferay/liferay-blade-samples/tree/a2ed923d21338d30fbdbcba9e703f35edb8ae4d4/gradle/extensions/struts-action
But the question why you want to do it? There are way better way in Liferay 7 to expose endpoints. Have a look at the REST provider
https://dev.liferay.com/ca/develop/tutorials/-/knowledge_base/7-0/jax-ws-and-jax-rs

Related

Liferay DXP which portlet archetype to be backed by REST-Service

With Liferay DXP a new Rest-Service archtype is provided. I successfull created a Rest-service an deployed it on my DXP.
My question is how to create/generate a portlet that uses the rest-service? Is there an archetype for a pure HTML/JS portlet? Or do i have to use and old one and modify it (how?).

How to use/connect a database, EJB with TomCat [duplicate]

This question already has answers here:
How to deploy EJB based application on Tomcat
(4 answers)
Closed 6 years ago.
I created a simple project JAVA EE with GlassFish to implement a simple REST API. During this project, I created a jdbc pool connection (with the glassfish interface) with postgresql and use EJB and Jersey to store my data in the database. There is no problem but now I would like to do the same with Tomcat to deploy on bluemix but I don't really understand...
I created a web project dynamic with tomcat 8.5 on Eclipse, created a simple jsp file to test and deploy it on bluemix, that works ! But now I would like to connect a database to my tomcat application like before, I googled it but I don't understand if it is possible and how to do this...
Anybody can help me please ?
Thank in advance :)
You cannot deploy EJBs in Tomcat because it only implements the servlet and JSP specifications from Java EE.
You can use TomEE which is a full EE stack based on Tomcat but includes OpenEJB, OpenJpa etc. In their site you can find how to deploy TomEE as a war in a plain Tomcat in case that you want to use your existing Tomcat installation. Check the links below
TomEE Home
TomEE deployement as war
TomEE Datasource configuration

How to create restful web services on ejb 3.0?

How to create restful web service on ejb 3.0. Can anyone share any tutorial about it?
I am using Netbean IDE 8 and Jboss 6.2.

Tutorial for creating own portlet in liferay with eclipse

I want to create My Own Portlet With the Eclipse JUNO for Liferay. I have googled a lot but that's provide me only for using with netbeans so can anyone guide me or give me link of the tutorial for the creating portlet from scratch in eclipse.
I have tried with the following
ADD-> new Liferay Projects
And then its not showing in a liferay the portlet which i have created
I have successfully installed liferay in my windows7 as well as i have also integrated ready made books portlet but just having while creating simple hello world portlet of my own
very before i have even follow this link http://www.youtube.com/watch?v=-EbyIbMWrCI
but its showing my portlet in update manager option in admin account as a status is "UNKNOWN"
For creating a portlet at Eclipse please have a look at Liferay development in Eclipse .
For getting ready portlet visible on Liferay you could find instructions for example on this: How to deploy portlets to Liferay?
Here is the installation guide and getting started tutorial.

How to integrate JasperServer into Liferay

How can I integrate JasperServer 4 to Liferay 6? I found an article that describes how to integrate JasperServer CE 3.7.0 into Liferay 6.0.5. But I doubt that it won't be applicable to version 4. I check http://sourceforge.net and found a portlet for JasperServer 3.7.1. However, there is no JasperServerPortlet for version 4 in the web site.
There's one here:
http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%204.7.0/ - JasperReportsServer-portlet-4.7.0.war
Note though that it's intended for JBoss portal, so it's possible something won't work in Liferay. Unfortunately, this would mean you'd have to develop your own integration for Liferay.