问题:
用strtus注解的形式生成一个action
@ParentPackage("struts-default")
@Namespace("/welcome")
@Results(value={
@Result(name="success",location="/pub/index.html"),
@Result(name="fail",location="/pub/index1.html")
})
public class IndexAction extends ActionSupport{
@Action(value="/index")
public String index(){
System.out.println("ceshi1");
return "success";
}
}
访问URL:http://localhost:8080/项目/welcome/index.do 可以正常访问
但是为什么 我访问URL改为:
http://localhost:8080/项目/test/index.do
或
http://localhost:8080/项目/welcome/index11.do
也都可以访问,这是问什么啊?求大神指教
这应该是在配置文件中配置出来的效果
tomcat里原来的东西没删