I have a tomcat myeclipse servlet project, if /w HTML links i use "/" or with CSS I use background: url(/); the link generated ends up being localhost: 8080/myReference, problem is my entire project is under the context /hs, so the reference generated should be localhost:8080/hs/myReference. I don't want to use the HTML base tag, because I need this root changed for both CSS,HTML & JS.
Here is the server.xml entry we have:
<Context path="/hs" docBase="hs" reloadable="true" crossContext="true">
<Resource name="jdbc/hsDS" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="0" maxWait="10000" username="3" password="1" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/healthsafety?autoReconnect=true" />
</Context>
This has been driving me crazy, I need to get this sorted so can use "/" absolute references in HTML,CSS,JS, any help would be much appreciated!