I have a simple request mapping that opens up an html file residing in static folder. It works correctly when the request mapping is a one part request like '/town' but does not works (returns 404) on urls like '/visual/town'. When I debug, the program falls to the desired place though. It just cannot recognise the file that it points to when the mapping constitutes of two or more parts. This doesn't makes sense to me at all.
This one works :
@Controller("VisualHomeController")
public class HomeController {
@RequestMapping(value = "/town")
public String emergentTown() {
return "static/visual/emergent_town.html";
}
}
This one does not :
@Controller("VisualHomeController")
public class HomeController {
@RequestMapping(value = "/visual/town")
public String emergentTown() {
return "static/visual/emergent_town.html";
}
}
And here is my servlet mapping, It seems that the problem arises here :
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>