Foros de discusión

null is not a valid include in Generic portlet

thumbnail
Sujeet Rai, modificado hace 11 años.

null is not a valid include in Generic portlet

New Member Mensajes: 9 Fecha de incorporación: 22/10/12 Mensajes recientes
null is not a valid include in Generic portlet..Can u plz help me?
thumbnail
Priyanka Dhingra, modificado hace 11 años.

RE: null is not a valid include in Generic portlet

Liferay Master Mensajes: 501 Fecha de incorporación: 20/12/11 Mensajes recientes
Please give the stacktrace here.
and something on what you did in the code.
thumbnail
Sujeet Rai, modificado hace 11 años.

RE: null is not a valid include in Generic portlet

New Member Mensajes: 9 Fecha de incorporación: 22/10/12 Mensajes recientes
I am creating portlet using Generic portlet class. Thats it.I am not written any code. Just creating the portlet using Generic portlet class and deploy it in the server.

This is the error am getting in the console


ERROR [http-bio-8080-exec-12][ThreadPortlet:49] null is not a valid include
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: null is not a valid include in Generic portlet

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Post your portlet class and portlet.xml
John Carter, modificado hace 11 años.

RE: null is not a valid include in Generic portlet

Junior Member Mensajes: 53 Fecha de incorporación: 18/10/12 Mensajes recientes
Sujeet,

You are using genericPortlet if error raised just after deployment (i.e. when init() method is called), then something is missing in init method ,it should always have code super.init(config) and if the error raised at the time of view then ,probably your are passing null value as the jsp path ,below is the code i have used and it's working fine ,may be it's helpful .


public class PortletRenderer extends GenericPortlet {

public void doView(RenderRequest request, RenderResponse response)
		throws PortletException, IOException {
	String viewTemplate = 	getInitParameter("view-template");;
	PortletContext portletContext = getPortletContext();

	PortletRequestDispatcher portletRequestDispatcher = portletContext.getRequestDispatcher(viewTemplate);
	portletRequestDispatcher.include(request, response);
	//super.doView(request, response);
}
}
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: null is not a valid include in Generic portlet

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
It means you are passing parameter value as null in include(viewJSp , request , response) method.