动作代码:
@ParentPackage("basePackage")
@Namespace("/")
@Action(value = "userAction")
@AllowedMethods("test")
public class UserAction {
private static final String[] test = null;
private static Logger logger = Logger.getLogger(UserAction.class);
public void test() {
logger.info("进入action");
}
}
在struts.xml
配置文件中:
<constant name="struts.strictMethodInvocation.methodRegex" value="([a-zA-Z]*)"/>
我想参观
http://localhost:8080/sshe/userAction!Test.action
现在错误:
HTTP 状态 404 - 没有为与上下文路径 [/sshe] 关联的命名空间和操作名称 [/] [userAction test] 映射的操作。
我想知道有没有地方可以设置。我怎样才能访问这个地址?