I am facing a problem on my migration to Tomcat7 to Tomcat9.
I am trying to deploy my web app but I keep having the same error:
org.apache.jasper.JasperException: /tiles/layout.jsp (Zeile: [5], Spalte: [0]) Unable to find taglib [myTagLib] for URI: [/META-INF/myTagLib.tld]
For sure I did not change the structure of my app so I cannot understand where is the problem. I tried to change the path of the Taglib but it does not work.
This is the definition I have:
File layout.jsp
:
<%@ include file="/WEB-INF/include/taglibs.jsp" %>
File taglibs.jsp
:
<%@ taglib prefix="gam" uri="/META-INF/gam-html.tld"%>
Here two screenshots showing the file system on Eclipse and Explorer (please note the name of the files have been crossed due to privacy issues):
I have researched and it seems that tomcat 9 performs a different taglib scanning as previous versions: https://talk.openmrs.org/t/unable-to-find-taglib-c-for-uri-web-inf-view-module-legacyui-taglibs-c-rt-tld/10832/5
Anyone has any idea of what to do here? Thanks a lot in advance.
Update
I just realised, if I move the file to any folder under web-inf and modify the URI it works. I moved it to the same folder as taglibs.jsp on WEB-INF/include/myTaglib.tld
Apparently the scanning only works on folders under web-inf? anybody knows how to change this?