A XMA-Webapplication is conforms to the WAR-Standard (see: http://java.sun.com/j2ee/1.3/docs/ servlet specification (2.3) -> Chapter 9 : Web Applications ), with a view additional specifications:
Contains theApplication and Plugin Descriptors (Application and Plugin Descriptors)
Component-Archives are packed to be downloaded by the client-runtime
The web.xml File contains all required XMA-Configurations
The Server Runtime is included into the WEB-INF/lib
All Help-pages are included in help/at/spardat
Example:
A web.xml of an XMA application has to register these servlets and listener:
at.spardat.xma.session.HashFilter
For unique version identification XMA components (which are JAR files) are transferred with an hashvalue appanded to their file name. In the actual deployment the JAR files have no hashvalue, so for finding the JAR files at the server, the hahsvalue is removed by this filter.
at.spardat.xma.session.LoginServlet
Handles the login process.
at.spardat.xma.rpc.RPCServletServer
Handles the RPC comunication.
at.spardat.xma.at.spardat.xma.datasource.TabularServletServer
Handles the comunication with a datasource (usual a domain). For details about datasources, see Data Sources.
at.spardat.xma.boot.servlet.XmaLauncherServlet
At the initiation of a connection to an XMA application this servlet delivers a response which is mapped by its content type to the XMA-Bootruntime's launcher.
at.spardat.xma.boot.server.BRTContextListener
This listener checks if the xma-app.xml is correct and calculates the hashvalues of the xma-app.xml and plugins.xml. The hashvalue of these files is checked by the XMA-Bootruntime to determine if the application downloaded in its cache is still valid.
Beside registering and mapping the servlets, the *.xma URL pattern ist mapped to the MIME type application/x-xmalauncher.
The following listing shows a suitable web.xml. Note that the XMA project creation wizard for Eclipse always generates a web.xml such as this (also see Overview).
<web-app>
<filter>
<filter-name>HashFilter</filter-name>
<filter-class>at.spardat.xma.session.HashFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HashFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>at.spardat.xma.boot.server.BRTContextListener</listener-class>
</listener>
<servlet>
<servlet-name>session</servlet-name>
<servlet-class>at.spardat.xma.session.LoginServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>rpc</servlet-name>
<servlet-class>at.spardat.xma.rpc.RPCServletServer</servlet-class>
</servlet>
<servlet>
<servlet-name>tabular</servlet-name>
<servlet-class>at.spardat.xma.datasource.TabularServletServer</servlet-class>
</servlet>
<servlet>
<servlet-name>launch</servlet-name>
<servlet-class>at.spardat.xma.boot.servlet.XmaLauncherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>session</servlet-name>
<url-pattern>/session</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rpc</servlet-name>
<url-pattern>/rpc</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>tabular</servlet-name>
<url-pattern>/tabular</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>launch</servlet-name>
<url-pattern>*.xma</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>xma</extension>
<mime-type>application/x-xmalauncher</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>