简体   繁体   English

版本1.1中的struts-config中的通配符

[英]wildcard characters in struts-config, version 1.1

My application is using struts 1.1. 我的应用程序使用的是Struts 1.1。 I'm trying to group URL forwards, using wildcards. 我正在尝试使用通配符对URL转发进行分组。

For example, if the action is like this: 例如,如果操作是这样的:

action path="/edit/product" type="classname" 操作路径=“ / edit / product” type =“ classname”
forward 向前
name="success" name =“成功”
path=".myapp.main" path =“。myapp.main”
action 行动

Replacing the first line above with 将上面的第一行替换为
action path="/edit/*" type="classname" 动作路径=“ / edit / *” type =“ classname”
doesn't work. 不起作用。 Any other step is required, to forward any URL beginning with /edit/ to myapp.main? 需要执行任何其他步骤才能将以/ edit /开头的URL转发到myapp.main?

EDIT: removed the brackets, as the code wasn't showing up. 编辑:由于代码未显示,因此删除了括号。

据我所知,Struts不支持这种通配符配置。

laz, it does support. laz,它确实支持。 I'm not sure if version 1.1 supports though. 我不确定版本1.1是否支持。

http://www.oreillynet.com/onjava/blog/2004/12/struts_12_offers_cool_new_feat.html http://www.oreillynet.com/onjava/blog/2004/12/struts_12_offers_cool_new_feat.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM