Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74015

Spring MVC portlet template doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.10 EE GA1
    • Fix Version/s: None
    • Labels:
      None

      Description

      The Spring MVC portlet template ([liferay-plugins]/tools/templates/portlet_spring_mvc_tmpl/**) has the following issues:

      1. Unresolved build time dependencies
      2. 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:

      1. In Liferay-Plugins-SDK/portlets, execute command create foo-spring-mvc "Foo Spring MVC" spring_mvc
      2. ant compile
        ... resolve requirements (see suggested fix 1)
      3. ant deploy
      4. 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>

       

        Attachments

          Activity

            People

            • Assignee:
              raven.song Raven Song
              Reporter:
              james.hinkey James Hinkey
              Participants of an Issue:
              Recent user:
              Raven Song
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 8 weeks, 3 days ago

                Packages

                Version Package