Fórumok
jsp import statements in hooks
Dave Weitzel, módosítva 13 év-val korábban
jsp import statements in hooks
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2009.11.18. Legújabb bejegyzések
I'm following the Liferay In action example (chapter 10) to develop a small hook to extend the fields in calendar using the IDE.
I added these lines to the view_event.jsp to expose my types to the jsp:
<%@page import="com.teamw.liferay.calendar.reg.model.CalReg" %>
<%@page import="com.teamw.liferay.calendar.reg.service.CalRegLocalServiceUtil" %>
When I try to run the view_event.jsp I get this error:
"Only a type can be imported. com.teamw.liferay.calendar.reg.model.CalReg resolves to a package"
If I add a ".* to the end of the import statements I get the errors:
"CalReg cannot be resolved to a type"
"CalRegLocalServiceUtil cannot be resolved"
implying that the import statements were ok.
I have a feeling there is something wrong with the classpaths and/or build paths in the IDE - I have also deployed manually using ant deploy.
I have tried researching the "only a type can be imported" error but cant see any conclusive reason for it
Any help appreciated
Dave
I added these lines to the view_event.jsp to expose my types to the jsp:
<%@page import="com.teamw.liferay.calendar.reg.model.CalReg" %>
<%@page import="com.teamw.liferay.calendar.reg.service.CalRegLocalServiceUtil" %>
When I try to run the view_event.jsp I get this error:
"Only a type can be imported. com.teamw.liferay.calendar.reg.model.CalReg resolves to a package"
If I add a ".* to the end of the import statements I get the errors:
"CalReg cannot be resolved to a type"
"CalRegLocalServiceUtil cannot be resolved"
implying that the import statements were ok.
I have a feeling there is something wrong with the classpaths and/or build paths in the IDE - I have also deployed manually using ant deploy.
I have tried researching the "only a type can be imported" error but cant see any conclusive reason for it
Any help appreciated
Dave
Dave Weitzel, módosítva 13 év-val korábban
RE: jsp import statements in hooks
Regular Member Bejegyzések: 208 Csatlakozás dátuma: 2009.11.18. Legújabb bejegyzések
The only way around this I have found so far is to put the <hookname>-hook.service,.jar file into the tomcat /lib/ext directory
No doubt it could be placed in other locations but why isn't it being picked up from the
webapps/<hookname>/WEB-INF/lib directory?
I will have to remember to update things when I change the service definition (which I have to as I need too process Dates and hence bring multiple integers form the user interface)
Is this an SDK issue or IDE?
No doubt it could be placed in other locations but why isn't it being picked up from the
webapps/<hookname>/WEB-INF/lib directory?
I will have to remember to update things when I change the service definition (which I have to as I need too process Dates and hence bring multiple integers form the user interface)
Is this an SDK issue or IDE?