I'm using struts2 + convention + rest to build my Web project. There are many jsp files in the content folder. So I want to classify them by folders. For example, I want to put user.jsp
, user-list.jsp
and user-edit.jsp
in \content\user
folder. And I must add Namespace
annotation to UserController
, as follow:
@Namespace("/user")
public class UserController
But if I do that, the url to access user.jsp
changes to localhost:8080\projectName\user\user
. I don't like so much user
int the url.
So my question is, can I change the default mapping rule to access user.jsp
by localhost:8080\projectName\user
? If I can't change it, then how to manage so much jsp files in \WEB-INF\content
folder?
Any help will be greatly appreciated.