I find out that the @ResultPath
annotation can solve my issue. So the code become as follows:
@ResultPath("/WEB-INF/content/user")
public class UserController
By doing this, I could access WEB-INF/content/user/user.jsp
file by url localhost:8080/projectName/user
.
I'm still wondering if there is any approach to change the default result path to the way of /WEB-INF/content/{controllerNamePrefix}
at a single position, instead of adding annotation to each controller class.