I’m working with <spring:url /> because our project is located at domain/ProjectName/mappings/here. I posted about some confusion here: How to use <spring:url /> with an <a> tag? . Now the issue I’m having is because I’m saving the URLS to a database. So I get URLs like domain/ProjectName/ProjectName/mappings/here. How can I avoid this? If spring needs to add ProjectName, shouldn’t it be able to check for it’s existence first?
I’m working with <spring:url /> because our project is located at domain/ProjectName/mappings/here . I
Share
From your last comment, yes the
spring:urltag does have an option to exclude the contextPath portion of the URL. Just set thecontextattribute to an empty string:I’m not sure this will fix your problem though, as it seems unlikely that the
spring:urltag is adding the contextPath twice. That seems more likely to be happening somewhere else in your code. Either way this should help you find out.