KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > madvoc > CustomAction


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package madvoc;
4
5 import jodd.madvoc.meta.Action;
6 import jodd.madvoc.meta.MadvocAction;
7 import jodd.madvoc.meta.InterceptedBy;
8
9 /**
10  * Custom paths
11  */

12 @MadvocAction("/foo/boo")
13 @InterceptedBy(MyInterceptorStack.class)
14 public class CustomAction {
15
16     /**
17      * Action mapped to '/foo/hello'
18      * Result mapped to '/foo/hello.ok'
19      */

20     @Action("/foo/hello")
21     public String JavaDoc execute() {
22         return "ok";
23     }
24
25     /**
26      * Action mapped to '/foo/boo.zoo/again.exec'
27      * Result mapped to '/foo/boo.zoo/again.jsp'
28      */

29     @Action("zoo/{N}.exec")
30     public String JavaDoc again() {
31         System.out.println("CustomAction.again");
32         return "";
33     }
34
35     /**
36      * Action mapped to '/foo/boo-aa/temp.bb'
37      */

38     @Action("{P}-aa/{N}.bb")
39     public void temp() {
40     }
41
42 }
43
Popular Tags