I have following variable to be used as a public variable in the application. As you can see it has the main domain of the website as its value. The issue is, once the application is loaded it does not have any value, I need to refresh the page for it to have its correct value.
<c:set var="url" scope="application"
value="http://www.example.com" />
I am using Tiles3 and this line is in baseLayout.jsp file.
Code
<link rel="stylesheet"
href="${url}/resources/mystyle.css">
At first the addresses in the source of the page that are supposed to have the URL value are as following
<link rel="stylesheet"
href="/resources/mystyle.css">
After refreshing the page the address will become as following
<link rel="stylesheet"
href="http://www.example.com/resources/mystyle.css">