How to include a file in the following folder WEB-INF\\includes\\header.js in jsp using tomcat. I have the included the following in jsp file but it does not work \"
<
<script type="text/javascript">
<%@include file="../foo.js" %>
</script>
foo.js is under WEB-INF/jsp and the file include it is under WEB-INF/jsp/common
Put a "/"
before "WEB-INF"
like this,
<script type="text/javascript" src='<c:url value="/WEB-INF/includes/header.js"/>'></script>
and it will work fine. :)