我想创建一个 servlet 来充当一堆 restlet 应用程序的容器。我已经为一个 restlet 应用程序完成了 servlet,但我不知道如何修改 web.xml 以适应许多应用程序。这是单个restlet的web.xml:(几乎逐字逐句摘自“Restlet in Action MEAP”):
<?xml version="1.0" encoding="UTF-8"?>
...
<display-name>Servlet engine as a container of Restlet applications</display-name>
<servlet>
<servlet-name>CompanyServerApplication</servlet-name>
<servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.application</param-name>
<param-value>server.CompanyServerApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>CompanyServerApplication</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>