Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
Nick Straguzzi
Bundling a JSP within a Theme plugin?
2. Dezember 2011 09:19

Nick Straguzzi

Rang: New Member

Nachrichten: 20

Eintrittsdatum: 29. April 2011

Neue Beiträge

I'm creating a Liferay theme plugin using 6.0.6. Most of the 'code' per se is Velocity; however, for one component I would like to use a JSP file which would be bundled with the rest of the Theme WAR.

This is proving to be very difficult. A Theme plugin, unlike a Portlet, EXT or Hook plugin, isn't really a web application or servlet. It doesn't prepare a complete JSP environment. (I'm using Eclipse IDE) So, while I can write a JSP that "works" as long as I am using only core Java, I can't include any Liferay libraries, can't include a taglib (there's no web.xml file to drop my definitions), and can't even get proper syntax checking within Eclipse.

Has anybody done this successfully?
If not, is there a different avenue I should take? I have a component that uses a little bit of runtime login, but I feel it's far too lightweight to create a full-blown portlet -- I just want a simple JSP with access to the standard LR defineObjects taglib context.

David H Nebinger
RE: Bundling a JSP within a Theme plugin?
2. Dezember 2011 13:36

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 13216

Eintrittsdatum: 1. September 2006

Neue Beiträge

Create a plugin that combines a theme and a hook. It will be one deployable war file that will contain all of the parts that you need, and will allow for the inclusion of the jsp basically as part of the theme.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!