We help IT Professionals succeed at work.

RDSDispatchServlet ?

royjayd
royjayd used Ask the Experts™
on
hi guys
I am using flex with spring blazeds. In my web.xml i have
------------------------------------------------------------------------------------
<servlet>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <display-name>MessageBrokerServlet</display-name>
        <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
        <init-param>
            <param-name>services.configuration.file</param-name>
            <param-value>/WEB-INF/flex/services-config.xml</param-value>
       </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
   
    <servlet>
        <servlet-name>RDSDispatchServlet</servlet-name>
      <display-name>RDSDispatchServlet</display-name>
        <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
         <init-param>
         <param-name>useAppserverSecurity</param-name>
         <param-value>false</param-value>
         </init-param>        
        <load-on-startup>10</load-on-startup>
    </servlet>

    <servlet-mapping id="RDS_DISPATCH_MAPPING">
        <servlet-name>RDSDispatchServlet</servlet-name>
       <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
     </servlet-mapping>

    <servlet-mapping>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>
----------------------------------------------------------------------
I understand <servlet-name>MessageBrokerServlet</servlet-name>  which references the services-config.xml

But What exactly does this below code represent?
 <servlet>
        <servlet-name>RDSDispatchServlet</servlet-name>   -- why do we use this servlet ?      
        <display-name>RDSDispatchServlet</display-name>
        <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
            <init-param>
      <param-name>useAppserverSecurity</param-name>
      <param-value>false</param-value>
            </init-param>        
        <load-on-startup>10</load-on-startup>
    </servlet>

    <servlet-mapping id="RDS_DISPATCH_MAPPING">
        <servlet-name>RDSDispatchServlet</servlet-name>
        <url-pattern>/CFIDE/main/ide.cfm</url-pattern>   -- what is this  ?  
        </servlet-mapping>

Also, flex communicates using AMF over http. why exaclty is amf over http faster than http ?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
RDSDispatchServlet is used by Flash builder to get destination details.

the pattern is used by cf to handle requests for files which may not exist, it has a list of patterns that match servlets. so coldfusion knows that the pattern '/CFIDE/main/ide.cfm' will mean it needs to invoke the RDS servlet, ie a request with that URL in it will cause it invoke the RDSServlet without the file necessarily being there.

Does that make sense?
AMF is quicker because it uses a binary format