Announcement Announcement Module
No announcement yet.
Output html page Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Output html page

    I'm trying to add a SimpleUrlHandlerMapping to my spring - blazeDS configuration to output a dynamically generated html page for a specific url.

    This is the current mapping for the spring DispatcherServlet:

        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>

    I've tried to add a SimpleUrlHandlerMapping as a bean in the applicationContext.xml like this:

      <bean id="publicUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
    But when a request comes in at /messageBroker/index.html, it's handled like this:

    DEBUG SimpleUrlHandlerMapping - Mapping [/index.html] to handler '[email protected]'
    So it's being handled by the flex MessageBroker, but what i'm trying to do is to map this request directly to my Controller, without any blazeds interaction.

    Anyone knows if this is possible somehow ?

  • #2
    Set the order property on your additional handler mapping so that it comes first in the chain.


    • #3
      Btw, it's worth noting that in M2 you cannot control the order of the handler mapping that is installed by the namespace config tags, but this has been fixed in trunk and will be available in the impending RC1.

      Either way, for your case, setting the order of your custom mapping to a lower value such as 0 should get the job done.


      • #4
        thanks for the hint, my controller seems to kick in now, but i get a ServletException:

        No adapter for handler [[email protected]]: Does your handler implement a supported interface like Controller?
        It implements org.springframework.web.servlet.mvc.Controller. I've tested the controller before with a non spring-flex servlet and it worked fine.


        • #5
          have you try this :

          This fix the problem for me.