Fórum

Liferay IDE 3.0: JSP files validation in OSGI module

thumbnail
Alexey Kakunin, modificado 7 Anos atrás.

Liferay IDE 3.0: JSP files validation in OSGI module

Liferay Master Postagens: 621 Data de Entrada: 07/07/08 Postagens Recentes
Hi!
I've created simple Liferay 7.0 mvc portlet with using Liferay IDE 3.0 wizard . In Liferay 7 portlet implemented as a OSGI module and placed into resources/META-INF/resources folder.

But validation for JSP does not work:
1. All tags displayed as yellow (cannot find TLDs)
2. view.jsp included /init.jsp - but validation cannot recognize it - so, even I import any class in init.jsp - it's usage still marked as error in view.jsp

Any ways to fix JSP validation in this case?
thumbnail
Andy Wu, modificado 7 Anos atrás.

RE: Liferay IDE 3.0: JSP files validation in OSGI module

Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
hi Alexey, you can right click the project and select "Configure->Add Jsp Validation Support" to see if it can help .
thumbnail
Alexey Kakunin, modificado 7 Anos atrás.

RE: Liferay IDE 3.0: JSP files validation in OSGI module

Liferay Master Postagens: 621 Data de Entrada: 07/07/08 Postagens Recentes
Hi! Thank you - it is a little bit better. Now it see classes, defined in /init.jsp - but write me about unknown taglibs:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>


Actually only 1 taglib it isnot marked as unknow is

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
thumbnail
Andy Wu, modificado 7 Anos atrás.

RE: Liferay IDE 3.0: JSP files validation in OSGI module

Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
you can add
compile group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
to you build.gradle dependencies block , and refresh gradle project (right click -> Gradle -> refresh gradle project).
thumbnail
Alexey Kakunin, modificado 7 Anos atrás.

RE: Liferay IDE 3.0: JSP files validation in OSGI module

Liferay Master Postagens: 621 Data de Entrada: 07/07/08 Postagens Recentes
Hi Andy! I'm using Maven and adding dependencies helped!
Thank you very much!
BTW - I also had to add jstl-impl into dependency list:
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>com.liferay.util.taglib</artifactid>
			<version>2.0.0</version>
			<scope>provided</scope>
		</dependency>		
		<dependency>
			<groupid>org.glassfish.web</groupid>
			<artifactid>jstl-impl</artifactid>
			<version>1.2</version>
			<scope>provided</scope>
		</dependency>
thumbnail
Andy Wu, modificado 7 Anos atrás.

RE: Liferay IDE 3.0: JSP files validation in OSGI module

Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
good to know that !
keep going bro.