Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to add a dependency in core jsp fragment?
Check this
https://web.liferay.com/web/user.26526/blog/-/blogs/adding-dependencies-to-jsp-fragment-bundles
I have already checked this link but could not get the answer...
Hello,
I am also facing same issue. Please help.
Thanks
Milind Jain:I am also facing same issue. Please help.
Please give us some hints. David's Blog article answers the question well. And if you can't make it work, just stating that it doesn't work won't give anyone the opportunity to "check line 42" in your code, where you missed a declaration.
Provide a minimal working (well, non-working in this case) implementation, that can be inspected and used to figure out what you did. Just with this statement, I'd just point you back to David's article. If there's something that you don't understand, just ask about a specific item. Or, better, post code. Simple, minimal, inspectable code.
Hi,
portal-web is not OSGi bundle, it's not possible to use OSGi fragments. If you need to modify Core JSP you should write a new module with a DynamicInclude. The use is limited but at least it allows referencing classes from other OSGi bundles. Dynamic Includes use RequestDispatcher so the JSP is loaded with your module's class loader that can see what's imported by your module.
Another way is to use old JSP Hooks but it's not possible to reference JournalArticle that is inside OSGi bundle. Core JSPs are loaded using Tomcat's webapp class loader that doesn't inherit from OSGi framework class loaders. The same is with the EXT.
HTH.
-- tom +
Tomas Polesovsky:portal-web is not OSGi bundle, it's not possible to use OSGi fragments. If you need to modify Core JSP you should write a new module with a DynamicInclude
Amazing how persistently I've read over the "core" part of the question. Thanks, Tom, for paying close attention.
If nothing else, you could deploy a core jsp change through an old hook, but limit the introduced difference to a new dynamic include, then provide a module to implement this DI.
Powered by Liferay™