We need to split out our JSP and CSS / JS files into different modules. Part of the reason is that the JSP's are to be hosted on Tomcat and the CSS / JS files are to hosted on an Apache front end. Also part of the reason is that for production deployment we want to combine and minify all those CSS & JS files into one, whilst still keeping their modularity in our development environment. In short, we think that keeping them as seperate IDEA modules is the best way to manage all that.
We have a Root module for the JSP files, and in our localhost run configuration that deploys to /
And we have a Static module for the CSS & JS files, and in our localhost run configuration that deploys to /static
So far no problem - each module has to have a seperate path on Tomcat. In the IDEA Root module we mark a module dependency on the Static module.
Here is where the problem lies - in the Root module in my JSP page I write:
IDEA finds the MyCss.css file in the Static module and all is great in the editor. But it doesn't work at runtime cause the Static module is mounted on /static!
If instead I write:
It works fine at runtime, but IDEA can't find the css file inside the editor so I get a yellow warning. And I can't ctrl-click to go directly to the css source.
Does anyone know how to solve this so that seperate web modules work fine in both the editor and at runtime?