ActionMappings

struts 1.2+ 使用 通配符映射 进行 action 的分发

风格不统一 提交于 2021-02-15 13:06:18
Using Wildcards in ActionMappings [Since Apache Struts 1.2.0] As an application grows in size, so will the number of action mappings. Wildcards can be used to combine similar mappings into one more generic mapping. The best way to explain wildcards is to show an example and walk through how it works. This example modifies the previous mapping in the ActionMapping Example section to use wildcards to match all pages that start with /edit: <!-- Generic edit* mapping --> <action path="/edit*" type="org.apache.struts.webapp.example.Edit{1}Action" name="{1}Form" scope="request" validate="false">