This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Use RequestToViewNameTranslator on MultiActionController?Page Title Module

Use RequestToViewNameTranslator on MultiActionController?

At the moment, I am using ControllerClassNameHandlerMapping to do the request - controller mapping. And I am now trying to use RequestToViewNameTranslator with MultiActionController.

The problem I get is in the request I have to use something like "/controllerPrefix/view.do" to make the dispatcher maps to a MultiActionController, thus the view translator will return logical view name like "/controllerPrefix/view", which means I have to put the JSP file inside a folder named "controllerPrefix"

Is there a better way to do it? I want all my JSP files put together. Thanks

Implement your own RequestToViewNameTranslator. It is an interface whichyou can implement. The default just strips the leading / and everything behind the last . . So create your own and register it in your ApplicationContext.

Comment

Implement your own RequestToViewNameTranslator. It is an interface whichyou can implement. The default just strips the leading / and everything behind the last . . So create your own and register it in your ApplicationContext.