RE: How to extend module's .java and .jsp in the same project

Olaf Kock, modified 3 Years ago. New Member Post: 1 Join Date: 8/11/22 Recent Posts

Hi! I'm trying to extend login.web module with java code and some jsp changes.

I was looking through the liferay ext module guide and especially login-web-ext example. So when I deployed module from this example to liferay, interface has not changed at all, but java classes are working properly.

I have tried some more ways to override an existing jsp, but it looks like every time original jsp overrides my custom page. So I tried to do this with JSP module override, and it works fine, but I need to extend java and jsp in the same module.

Is there any way to do that?

thumbnail
Olaf Kock, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

You're right doing so in two different modules: Fragment bundles (which you need to overrided JSPs) are never started, so JSP fragments can't live in other bundles.

Your bundle could bring its own JSP, but I'd say: Why bother. It works, more modules doesn't cost anything. I doubt that you need to​​​​​​​ implement them in the same bundle.