Aug 21st, 2008, 07:16 PM
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
Aug 21st, 2008, 08:50 PM
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.
Aug 22nd, 2008, 01:44 AM
Hi Marten, thanks very much, I will give it a try. Cheers
Originally Posted by Marten Deinum