In my .jsp file I included a JS file 'abc.js'. This .js file has embedded java code to retrieve data value from a java class. For some reason Tomcat does not like the embedded java code. I was told that I have to change the Tomcat configuraiton to allow pasrsing Java inside the JSP .js file. Can someone tell me how do I configure Tomcat to do that?
document.getElementById("update_field" ).style.display = "<%=student.getUpdateField()%>";
Just in case enough people haven't said it already, a ".js" file is not a ".jsp" file. So, byt definition, it cannot contain Java code.
In any event, J2EE long passed the stage where it was expected to be a high-priced replacement for IIS ASPs, and the very thought of having View components (JSPs) contain executable (Java) code sets off a lot of people's blood pressure monitors. We've been there (long ago), done that (when we had no alternatives) and found better ways.
Got idle CPU cycles? Join the war on COVID-19 by donating them to find the coronavirus' weak spots. folding@home Runs in the background. https://foldingathome.org