村西头最帅的仔 2015-11-26 02:06 采纳率: 50%
浏览 1791
已采纳

strtus2 注解action 访问URL 配置

问题:
用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
也都可以访问,这是问什么啊?求大神指教

  • 写回答

2条回答 默认 最新

  • 紫气天堂 2015-11-26 03:05
    关注

    这应该是在配置文件中配置出来的效果

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器