I\'ve got a Tomcat app that is being served up from multiple domains. Previous developers built a method to return the application URL (see below). In the method they reques
How about using something like I did in this demo JSP ?
<% String requestURL = request.getRequestURL().toString(); String servletPath = request.getServletPath(); String appURL = requestURL.substring(0, requestURL.indexOf(servletPath)); %> appURL is <%=appURL%>