I'm working with a team of devs using Netbeans, but unfortunately the code they're working on has been stuck using ancient tech for far too long now. In some recent research, I discovered Java's "Expression Language" and I've been converting one of our webapps to use this for building stylesheet and script file URL links rather than the current "relative path" idea.
For example, we have one or two .jsp
files in the webapp root, and others in a subfolder, all of which are now using:
<link href="${pageContext.servletContext.contextPath}/assets/css/stylesheet.css" rel="stylesheet" type="text/css"/>
<script src="${pageContext.servletContext.contextPath}/assets/js/script.js" type="text/JavaScript"></script>
Netbeans 8.0.1 doesn't seem to pick up classes from the stylesheet; so even though it runs correctly in a browser, my test project is now riddled with "class not found" warning messages.
So my main question (using Java 6 or 7): is this a good way to do it or should I look for other options? Otherwise, is this simply an IDE bug that's got me worried for no reason..?
For the sake of clarity, I'm only just starting to drag them out of the Java 6 world.. I'm honestly not sure why, but until recently they've been against the idea of relying on application frameworks and libraries, opting to write everything themselves from scratch; so this is an attempt to "fix" a few glaring issues is our current apps to give us a chance to rewrite them using more modern technologies.