-
Type:
Bug
-
Status: Closed
-
Resolution: Won't Fix
-
Affects Version/s: 6.2.10 EE GA1
-
Fix Version/s: None
-
Component/s: Dev Tools > Plugins SDK
-
Labels:None
The Spring MVC portlet template ([liferay-plugins]/tools/templates/portlet_spring_mvc_tmpl/**) has the following issues:
- Unresolved build time dependencies
- Null portlet request dispatcher prevents the portlet from showing its content. Compare the foo-*no-content.png with foo-*with-content.png
ERROR [http-bio-8080-exec-50][MVCPortlet:357] null is not a valid include
Steps:
- In Liferay-Plugins-SDK/portlets, execute command create foo-spring-mvc "Foo Spring MVC" spring_mvc
- ant compile
... resolve requirements (see suggested fix 1) - ant deploy
- Add the portlet to a page
Actual Results:
- ERROR [http-bio-8080-exec-50][MVCPortlet:357] null is not a valid include
- Content doesn't show in the portlet window
Expected Results:
Portlet shows content without error.
Suggested fixes:
1. These required dependencies should be added to the liferay-plugin-package.properties file's portal-dependency-jars property:
- spring-asm.jar
- spring-web-portlet.jar
- spring-web-servlet.jar
2. The resulting portlet.xml file should specify the following portlet class instead of Liferay's MVCPortlet class:
<portlet>
...
<portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>