title: Eliminate hardcoded file paths and urls in web development
body: <p>I'm currently developing a web site using servlets &amp; spring framework. As usual it contains lots of files (jsp, js, css, images, various resources etc).
  I'm trying to avoid writing any hardcoded path, or domain in any file ...</p>
  
  <p>For example as you may know when a request is handled you 'forward' it to a jsp page (it's path probably will be hardcoded). Other examples are imports images/css/js etc in jsp files ...</p>
  
  <p>Is there any general way (or tools) to avoid hardcoded paths/urls so any refactorings won't cause troubles?</p>
  
  <p><strong>EDIT</strong><br>
  I use netbeans 7.1.2 ... Unfortunately netbeans only helps with pure java code. When working with jsp files things are limited, and if you add custom tag files and Jsp 2.0 EL is like programming in console mode :p</p>