Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2874

Multiple extensions are stripped off resource request path

    Details

      Description

      Steps to reproduce:

      1) Add the following markup to portletViewMode.xhtml in the jsf-applicant-portlet:

      <a href="#{resource['example-cc:clipboard.xhtml']}">#{resource['example-cc:clipboard.xhtml']}</a>
      

      2) Change the servlet-mapping url-pattern from *.xhtml to *.jsf.

      3) Deploy the portlet and navigate to it in the browser.

      If the bug still exists, then the the javax.faces.resource parameter will equal clipboard (javax.faces.resource=clipboard). If the bug is fixed, the javax.faces.resource parameter will equal clipboard.xhtml (javax.faces.resource=clipboard.xhtml).

      This bug is due to the fact that ResourceImpl.getRequestPath() strips off extensions, but does not break after stripping the first extension. One possible fix would be to break after any extension is removed. However, there may be another related issue: .xhtml might always be stripped off if the servlet-mapping is *.xhtml . Before fixing this issue, it might be worth testing that by repeating the steps to reproduce while skipping step 2.

        Attachments

          Activity

            People

            Assignee:
            neil.griffin Neil Griffin
            Reporter:
            kyle.stiemann Kyle Stiemann (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                bridge-impl-2.1.0
                bridge-impl-3.1.0
                bridge-impl-4.1.0