Servlet Container / J2EE Deployment

For enabling Resoa within your webcontainer, you need to setup a As an example here a webdefault.xml configuration for  Jetty:

<!-- ==================================================================== -->
<!-- Resoa Service Container instance -->
<!-- ==================================================================== -->
	<param-value>/resoa/resources</param-value> <!--default is /resoa -->
	<param-name>serviceConfigFile</param-name> <!--default is WEB-INF/resoa.xml -->

Three arguments control the behavior of your Resoa container:

  • gatewayDir: The root directory of your gateway. If services need to load files for configuration, they should use the gateway function resoaGateway.getConfigFile(String path). If the path does not start with a systen property (i.e. ${user.home}) or ‘/’, the path string is merged with the gateway root directory.
  • serviceConfigFile: If you deploy a WAR to your container, the ResoaServletContextListener will look for a configuration file. Default name is WEB-INF/resoa.xml.
  • serviceClasspath: set the path, the ResoaServiceDomainExplorer should use as the lookup environment for Resoa domain jars.

The serviceConfigFile WEB-INF/resoa.xml

If you develop a web application with Resoa services enabled, add a resoa.xml file to your WEB-INF folder, specifying the URL to service domain mapping. An example:

<Rest xmlns="">
	<!-- Define the virtual Host domains for the application. -->
	<Hosts cookieDomain="" domain=""/>
	<Hosts cookieDomain="" domain="" />
	<!-- Define the URL to service dispatching -->
	<Dispatcher loginURL="/login.html">
		<SessionUrls>/member</SessionUrls><!-- URL's starting with /member will require authentication -->
		<SecureUrls>/secure</SecureUrls><!-- URL's starting with /secure will require HTTPS protocol -->
		<!-- Resoa URL to Service package routing. Map the java package name of your service model to an URL -->
		<Services path="/service/partner" package="" />
		<Services path="/service/products" package="" />
		<Services path="/service/main" package="" />
		<Services path="/service/media" package="" />