fix url generation when a context path is set
Merge branch '2.3.x_2.9' into 2.3.x_2.10