Affects Version/s: 7.0.2 CE GA3, 7.0.0 DXP SP2, Master
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
- Deploy attached WAR in Liferay 7.
- 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.