-1

I've come across a strange problem in a Spring site where if you use jumping anchors, it redirects me to the homepage.

For example, I have code like this (simplified);

 <a href="#configuration"><spring:message code='configuration.tab' /></a>
 <a id="configuration" class="noHover"><spring:message code='configuration.tab' /></a>

However, when I click the link, my website redirects to my homepage with the jumping anchor suffixed;

http://localhost:8080/web/#configuration

I am thinking this is something to do with the Spring security, but I am not positive.

Has anyone seen this?

gwnp
  • 1,127
  • 1
  • 10
  • 35

1 Answers1

0

I finally found the cause, I had set the following in my header;

<base href="${ctx}/" > 

Once I removed this code, my jumping anchors started to work properly again via the fragment-identifier. I had done this earlier in the project for convenience.

gwnp
  • 1,127
  • 1
  • 10
  • 35