Foros de discusión

Portlet without JSP

thumbnail
Hamidul Islam, modificado hace 7 años.

Portlet without JSP

Regular Member Mensajes: 111 Fecha de incorporación: 22/05/08 Mensajes recientes
Hi,
I want to integrate Angular JS with my portlet . My Liferay version is 6.2. The special requirement is that I should not use JSP, instead I need to use plain HTML along with Angular JS and CSS. Is it possible to have portlet without JSP?

Regards
Hamidul Islam
thumbnail
Fernando Fernandez, modificado hace 7 años.

RE: Portlet without JSP

Expert Mensajes: 396 Fecha de incorporación: 22/08/07 Mensajes recientes
The simpler way is to put your plain HTML in the JSP file and not use anything else from the JSP standard.
You can, however, get rid of the JSP file altogether, but I really don't see the point.

HTH

Fernando
thumbnail
Juan Antonio Calleja Moreno, modificado hace 7 años.

RE: Portlet without JSP

New Member Mensajes: 2 Fecha de incorporación: 8/11/11 Mensajes recientes
You could also use the code on another aplication server or in the same aplication server but out of Liferay and request the JSON Liferay services.

From my point of view, the best option is to continue using the JSP but that only contains HTML and js necessary to Angular.js. But in this case beware to use multiple portlets on the same page using Angular.js because the normal use of Angular.js is for single-page applications
thumbnail
Fernando Fernandez, modificado hace 7 años.

RE: Portlet without JSP

Expert Mensajes: 396 Fecha de incorporación: 22/08/07 Mensajes recientes
I don't know much about Angular (yet) but from what I've seen Angular's features are, in certain aspects, overlapping with Liferay. You might have some trouble with that.

Anyway, it seems someone has solved the problem of several portlets in the same page. Look at this: http://www.xtivia.com/instanceable-liferay-portlet-angularjs/

HTH,

Fernando
thumbnail
zaheer mohammed saddapalli, modificado hace 7 años.

RE: Portlet without JSP

Regular Member Mensajes: 165 Fecha de incorporación: 15/01/08 Mensajes recientes
Hamidul Islam:

I want to integrate Angular JS with my portlet . My Liferay version is 6.2. The special requirement is that I should not use JSP, instead I need to use plain HTML along with Angular JS and CSS. Is it possible to have portlet without JSP?


You should use .jsp file which can contain all you HTML, JS and CSS

If you want to use .html file for any reasons http://localhost:8080/file.html then you have to use IFrame concept.
Where you configure direct .html file.

Regards,
Mohammed Zaheer
thumbnail
David H Nebinger, modificado hace 7 años.

RE: Portlet without JSP

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
So forget all that has come before.

Push back on this request and tell them you need to use a JSP to launch the angular portlet.

"Why?" they will ask.

The reason is that you are going to want to populate data into the angular app that you can't do with some sort of simple html page. For example, if you want to pass any permission details for the current user so you can include permission checks in your angular templates. Or if you want to pass in portlet preference values. Or if you want to look up properties from the server side and include them.

Or...

Blindly saying "don't use JSP" is not a requirement, it's just a preference.