my project run on:
hXXp://localhost:8080/mvc
but when I rebuild on client part it would be:
hxxp://localhsot:8080/mvc-1.0.0-SNAPSHOT
I want get the parameter of mvc or mvc-1.0.0-SNAPSHOT in one of my controller of SpringMVC.
(because I will setting some dynamic picture path)
How to get these names in context or controller class?
Use
HttpServletRequest.getContextPath():