Announcement Announcement Module
Collapse
No announcement yet.
Use RequestToViewNameTranslator on MultiActionController? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use RequestToViewNameTranslator on MultiActionController?

    Hi guz,

    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

  • #2
    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


    • #3
      Originally posted by Marten Deinum View Post
      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.
      Hi Marten, thanks very much, I will give it a try. Cheers

      Comment

      Working...
      X