Announcement Announcement Module
No announcement yet.
why <flex:message-broker> tag broke all the URL Handler Mapping Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Ok, I see where some of the confusion might be coming from then. In web.xml, were you still trying to use both the extension mappings (i.e., *.html) and the path-based mappings? If that's the case, then I can see how alwaysUseFullPath might be necessary.

    There are actually some recent enhancements to MVC (that I worked on) that first landed in the 3.0.4 release that allow you to map your servlet to "/" while still preserving the behavior of the container's JspServlet and default servlet. Basically you just need to include:

    <mvc:default-servlet-handler />
    and requests for static resources and JSP rendering will still get forwarded correctly when you map the DispatcherServlet to "/".

    Further background on that is here:

    Also, for easiest results, I'd suggest configuring it in conjunction with:

    <mvc:annotation-driven />
    so that you don't have to manually manage the DefaultAnnotationHandlerMapping, etc.

    More info on that here:

    This is the approach that Roo-generated apps now use, and the Flex Addon sets up the MessageBroker within the same DispatcherServlet context, so that might be one way to see a complete example of this approach.


    • #17
      When I encountered this, I found another way to solve this:

      I added this to my applicationContext, which restored all my bean handler mappings:

      	<bean id="beanNameUrlHandlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
      	<bean id="controllerHandlerAdapter" class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/>