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

portlet servlet declaration is not generated in DS portlet web.xml

    Details

    • Fix Priority:
      3

      Description

      {markdown}
      Steps to reproduce:

      1. Add `module.framework.web.generator.generated.wabs.store=true` to your `portlet-ext.properties` file:

      echo module.framework.web.generator.generated.wabs.store=true >> portlet-ext.properties

      2. Start Liferay Portal.
      3. Deploy the attached portlet to Liferay Portal:

      cp ~/Downloads/com.liferay.faces.demo.jsf.ds.applicant.portlet.war $LIFERAY_HOME/deploy/

      4. Extract the generated servlet declaration from the `web.xml` of the deployed wab:

      unzip p osgi/wabs/com.liferay.faces.demo.jsf.ds.applicant.portlet*.war WEB-INF/web.xml |\
      grep -B 1 -A 7 '<servlet'

      If the bug still exists, the portlet servlet declaration and servlet-mapping will not be generated.

      The generated servlet and mapping should probably look something like this:{markdown}
              <servlet>
                      <servlet-name>Portlet Servlet</servlet-name>
                      <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
                      <init-param>
                              <param-name>portlet-class</param-name>
                              <param-value>my.portlet.PortletClass</param-value>
                      </init-param>
                      <load-on-startup>1</load-on-startup>
              </servlet>
              <!-- ... -->
              <servlet-mapping>
                      <servlet-name>Portlet Servlet</servlet-name>
                      <url-pattern>/portlet-servlet/*</url-pattern>
              </servlet-mapping>
      

      Note: In order to test the fix for this issue, you may need to add the workaround for LPS-66225 if that issue has not been fixed yet. If you don't apply that workaround and LPS-66225 has not been fixed yet, you will be unable to test that the portlet is functioning.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 28 weeks, 1 day ago

                  Packages

                  Version Package