Below is snippet from a JSP file.
Earlier I had used scriptlet
(<%=request.getContextPath()%>)
to populate the context path as shown in [A]
.
All 3 javascript files were being imported.
[A]
<script language="JavaScript1.2" type="text/javascript" src="<%=request.getContextPath()%>/js/a.js"></script>
<script language="JavaScript1.2" type="text/javascript" src="<%=request.getContextPath()%>/js/b.js"></script>
<script language="JavaScript1.2" type="text/javascript" src="<%=request.getContextPath()%>/js/c.js"></script>
I replaced the contextpath
population using EL(Expression Language) as shown in [B].
I also modified javascript files a.js and c.js and added some functions.
I redeployed my application ear. I see that the new file a.js is reloaded in the browser (IE) cache, but c.js
remains unchanged.
[B]
<script language="JavaScript1.2" type="text/javascript" src="${pageContext.request.contextPath}/js/a.js"></script>
<script language="JavaScript1.2" type="text/javascript" src="${pageContext.request.contextPath}/js/b.js"></script>
<script language="JavaScript1.2" type="text/javascript" src="${pageContext.request.contextPath}/js/c.js"></script>
Why does this happen? I suspect that javascript
errors in one of these external files (probably b.js
) is preventing c.js from loading.
Has anyone come across such a scenario. Please reply . Thanks.