留言板

MVC Portlet - jsp is not accessible by this portlet

Jiri Mecner,修改在11 年前。

MVC Portlet - jsp is not accessible by this portlet

New Member 帖子: 3 加入日期: 13-3-4 最近的帖子
Hi,

i have just deployed a portlet application developed on Liferay 5.2.3 using JSPPortlet "framework" to Liferay 6.1.1. Surprisingly i got a following error:


15:48:28,671 ERROR [http-bio-8080-exec-21][PortletServlet:115] javax.portlet.PortletException: Path /WEB-INF/jsp/view.jsp is not accessible by this portlet
javax.portlet.PortletException: Path /WEB-INF/jsp/view.jsp is not accessible by this portlet
        at com.liferay.util.bridges.mvc.MVCPortlet.checkPath(MVCPortlet.java:290)
        at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:365)
        at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:383)
        at com.liferay.util.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:145)


I wonder why path /WEB-INF/ is restricted in MVCPortlet? Because i dont want let jsp files accessible directly form browser.
thumbnail
David H Nebinger,修改在11 年前。

RE: MVC Portlet - jsp is not accessible by this portlet

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Jiri Mecner:
i have just deployed a portlet application developed on Liferay 5.2.3 using JSPPortlet "framework" to Liferay 6.1.1. Surprisingly i got an error.


It may be a surprise for you, but it's no surprise to me...

You must migrate your portlet to the 6.1.1 SDK and rebuild it. Resolve any coding problems identified, then deploy it.

There is so much that is different between 5.2.3 and 6.1.1, the error you encountered was just the first of many. Rebuilding it under the SDK that matches your Liferay version is the only way to ensure your portlet stands a chance of working when deployed.