Foren

Bundling a JSP within a Theme plugin?

Nick Straguzzi, geändert vor 12 Jahren.

Bundling a JSP within a Theme plugin?

New Member Beiträge: 20 Beitrittsdatum: 29.04.11 Neueste 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.

Thanks,
Nick
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Bundling a JSP within a Theme plugin?

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste 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.