1.最基本的@action注解
@Controller
@Scope(value = "prototype")
@ParentPackage(value = "nocheckLogin")
@Namespace("/home/hellovelocity")
此注解位于class之前,
@Action(value="toHome",results={@Result(name="success",location="/views/hellovelocity.vm")})
此为action注解
访问路径为 http://localhost:8080/ppt-mobile-site/home/hellovelocity/toHome.do
2.跳转到另外一个action
@Action(value="toTest",results={@Result(name="success",type="redirect",location="/home/hellovelocity/toHome.do")})
只需更改action注释即可,此action将跳转至上面的action
访问路径为 http://localhost:8080/ppt-mobile-site/home/test/toTest.do