Action Services

Top  Previous  Next

In the web application configuration file (web.xml) the *.doms URL Extensions are mapped to MoreMotion Service Invoker Servlet as follows.

<servlet>

  <servlet-name>moremotion-service-invoker</servlet-name>

  <servlet-class>org.moremotion.servlet.ServiceInvokerServlet</servlet-class>

  <load-on-startup>2</load-on-startup>

</servlet>

 

<servlet-mapping>

  <servlet-name>moremotion-service-invoker</servlet-name>

  <url-pattern>*.doms</url-pattern>

</servlet-mapping>

This definition specifies that all the URLs with extension *.doms are handled by the ServiceInvokerServlet of MoreMotion. When ServiceInvokerServlet receives a request it loads the Action Service Class that is mapped to the action and gives the control to it.

"DisplayPage" and "ProcessManager" are the two important built-in action services of MoreMotion. Users can also develop their own action services and introduce them though the MoreMotion configuration as follows.

<action name="MyAction">
  <class>mypack.MyActionServiceClass</class>
</action>

The action service then can be called as follows .

MyAction.doms?p1=p1value&p2=p2value

 

An Action Service is similar to a Servlet with the exception it is introduced in a MoreMotion configuration file instead of web.xml. Usually in very few cases a developer needs to develop a new Action Service since DisplayPage and ProcessManager services handle most of the cases.

See Action Configuration