掲示板

null is not a valid include in Generic portlet

thumbnail
11年前 に Sujeet Rai によって更新されました。

null is not a valid include in Generic portlet

New Member 投稿: 9 参加年月日: 12/10/22 最新の投稿
null is not a valid include in Generic portlet..Can u plz help me?
thumbnail
11年前 に Priyanka Dhingra によって更新されました。

RE: null is not a valid include in Generic portlet

Liferay Master 投稿: 501 参加年月日: 11/12/20 最新の投稿
Please give the stacktrace here.
and something on what you did in the code.
thumbnail
11年前 に Sujeet Rai によって更新されました。

RE: null is not a valid include in Generic portlet

New Member 投稿: 9 参加年月日: 12/10/22 最新の投稿
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
11年前 に Jitendra Rajput によって更新されました。

RE: null is not a valid include in Generic portlet

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
Post your portlet class and portlet.xml
11年前 に John Carter によって更新されました。

RE: null is not a valid include in Generic portlet

Junior Member 投稿: 53 参加年月日: 12/10/18 最新の投稿
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
11年前 に Jitendra Rajput によって更新されました。

RE: null is not a valid include in Generic portlet

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
It means you are passing parameter value as null in include(viewJSp , request , response) method.