Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Andrey Kazantsev
Developing hooks in Netbeans
March 4, 2009 3:35 AM
Answer

Andrey Kazantsev

Rank: Junior Member

Posts: 53

Join Date: February 17, 2009

Recent Posts

Hello. I'm developing hook plugin in Netbeans. I created following directory structure outside Netbeans:

hook/
hook/build.xml
hook/web/
hook/web/WEB-INF/
hook/web/WEB-INF/liferay-hook.xml
hook/web/WEB-INF/liferay-plugin-package.properties
hook/web/WEB-INF/web.xml
hook/web/WEB-INF/custom_jsps/
hook/web/WEB-INF/custom_jsps/html/
hook/web/WEB-INF/custom_jsps/html/portlet/
hook/web/WEB-INF/custom_jsps/html/portlet/asset_publisher/
hook/web/WEB-INF/custom_jsps/html/portlet/asset_publisher/display/
hook/web/WEB-INF/custom_jsps/html/portlet/asset_publisher/display/abstracts.jsp

Also I created build.xml file for packaging and deploying. This part works fine: hook plugin is packaged and deployed succesfully.

I want to develop it in the Netbeans, so I created new web project, free-form application and pointed it to my hook/ directory. It found my build.xml file. Building/deploying under Netbeans also works fine.

In my abstracts.jsp I have following lines of code:

1<%@ include file="/html/portlet/asset_publisher/init.jsp" %>


And Netbeans show error for this, it says that it is unable to find init.jsp, and it is right, because I have not this file in my hook — I don't want to replace it.

Because of this error auto-completion is not working, and this is very annoying. What can I do to fix this error? I know that I need to add this file somehow, but I don't know how to make this in clear way.

How do you develop your hooks? In ext environment?
Thomas Berg
RE: Developing hooks in Netbeans
January 4, 2010 5:22 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 119

Join Date: September 7, 2009

Recent Posts

You've probably already sorted this out ...

You should be able to include the missing file /html/portlet/asset_publisher/init.jsp and use it in your hook-project without replacing it.
As I understand, only files in your custom jsp-dir (defined in liferay-hook.xml) are replaced.

1<custom-jsp-dir>/WEB-INF/jsps</custom-jsp-dir>