Results 1 to 3 of 3

Thread: Use RequestToViewNameTranslator on MultiActionController?

  1. #1
    Join Date
    Jul 2008
    Posts
    16

    Question 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jul 2008
    Posts
    16

    Default

    Quote 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •