In the process of developing a Spring MVC web application using Apache Tiles, I have incorporated JavaScript libraries such as JQuery by including them in the pom.xml
file as dependencies. My query pertains to whether I can access these scripts from within the respective JAR files in my tiles configuration. If this is indeed possible, how would one go about achieving it? Would specifying the complete path to the Javascript file inside the JAR result in successful resolution?
<tiles-definitions>
<definition name="base.definition"
template="/WEB-INF/jsp/layout.jsp">
<put-attribute name="title" value="" />
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
<put-list-attribute name="javascripts">
<add-attribute value="<CAN THIS BE A LOCATION TO JAR??>" />
</put-list-attribute>
<definition>
<!--More stuff-->
</tiles-definitions>
For instance, let's consider a scenario where I've downloaded datatables-1.9.4-2.jar and placed it under \WEB-INF\lib. Inside this JAR, the desired JavaScript file resides at \META-INF\resources\webjars\datatables\1.9.4\media\js\jquery.dataTables.min.js. In this setup, how should the resource mapping be structured and how do I specify it within the add-attribute element?