Adjusting the deployment descriptor
The deployment descriptor /WEB-INF/web.xml needs some straight forward modifications: add a second module servlet and servlet mapping. Here's the new version:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">
<!-- Module Servlets -->
<servlet>
<servlet-name>outside</servlet-name>
<servlet-class>de.odysseus.calyxo.control.ModuleServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/calyxo-control-config-outside.xml</param-value>
</init-param>
<load-on-startup/>
</servlet>
<servlet>
<servlet-name>inside</servlet-name>
<servlet-class>de.odysseus.calyxo.control.ModuleServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/calyxo-control-config-inside.xml</param-value>
</init-param>
<load-on-startup/>
</servlet>
<!-- Module Mappings -->
<servlet-mapping>
<servlet-name>outside</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>inside</servlet-name>
<url-pattern>/inside/*</url-pattern>
</servlet-mapping>
<!-- Welcome File -->
<welcome-file-list>
<welcome-file>index.jspx</welcome-file>
</welcome-file-list>
</web-app>
We choose a prefix mapping for module inside, just for fun.
Note
If we also changed the servlet mapping for the outside
module, we needed to adjust the <jsp:forward>
in our welcome file, /index.jspx.
Test it, now (you may need to redeploy/restart/reload the application, depending on the application server you use). It should behave exactly as before.


