Announcement Announcement Module
Collapse
No announcement yet.
why <flex:message-broker> tag broke all the URL Handler Mapping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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:

    Code:
    <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:
    http://static.springsource.org/sprin...ervlet-handler

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

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

    More info on that here:
    http://static.springsource.org/sprin...otation-driven

    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.

    Comment


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

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

      Comment

      Working...
      X