也许我不明白你的问题,但我会试一试。AFAIK 是 Stripes 应用程序的 web.xml 中唯一需要使用 @URLBinding 作为 Web 应用程序中 URL 的“真实来源”的映射:
<filter>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>
<param-name>ActionResolver.Packages</param-name>
<param-value>com.your.action.beans.package</param-value>
</init-param>
<init-param>
<param-name>Extension.Packages</param-name>
<param-value>com.your.extension.packages</param-value>
</param-value>
</init-param>
</filter>
...
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
<servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
...
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<servlet-name>DispatcherServlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
这样,当您添加/删除操作 bean 和/或 JSP 时,无需更改 web.xml 中的任何内容。