The subject says it all, almost. How do I automatically fix jsp pages so that relative URLs are mapped to the context path instead of the server root? That is, given for example
<link rel="stylesheet" type="text/css" href="/css/style.css" />
how do I set-up things in a way that maps the css to my-server/my-context/css/style.css
instead of my-server/css/style.css
? Is there an automatic way of doing that, other than changing all lines like the above to
<link rel="stylesheet" type="text/css"
href="<%= request.getContextPath() %>/css/style.css" />