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

Resources in /META-INF/resources within /WEB-INF/lib jar can't be accesed as stated by Servlet 3 spec

    Details

      Description

      Discovered by user in forums: https://web.liferay.com/community/forums/-/message_boards/message/81790925

      Servlet 3 spec. (section 10.5, "Directory structure") states this concerning resources in /META-INF/resources:

      For example, for a Web application with the context path /catalog in a Web container, the index.html file at the base of the Web application hierarchy or in a JAR file inside WEB-INF/lib that includes the index.html under META-INF/resources directory can be served to satisfy a request from /catalog/index.html.

      In Liferay 7 we are avoiding getting resources in /META-INF/resources for WAB files. Additionally, we aren't searching those resources in jar files from /WEB-INF/lib.

      Steps to reproduce

      1. Deploy attached WAR in Liferay 7.
      2. Go to http://localhost:8080/o/com.68989.test-1.0-SNAPSHOT/Like_a_Boss.jpg.

      Expected result: you should see an image in browser. This image is located in a /META-iNF/resources under a /WEB-INF/lib jar file.
      Actual result: Image is not found and you are redirected to Liferay home.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 22 weeks ago