i want to have base context path set for all jsps, irrespective of having different request path which i have in my controllers, to avoid this i have added to my below code to my
layout.jsp <head>
section
<base href="${pageContext.request.contextPath}/myapp">
after adding above base url line to my layout.jsp , all of my jsps have this as base url instead of request pacific relative path.
but this is working only i append my context application name to the base url for example in my local i have http://localhost:8080/myapp
, where in the production , i will have context as "www.myapp.com". so is there any way to avoid mentioning my context root name, that it will work dynamically with respect the environment it runs