| 1 | wiki:Devel/Index |
| 2 | |
| 3 | = UTGB Request Dispatcher Mechanism = |
| 4 | |
| 5 | |
| 6 | == web.xml setting == |
| 7 | Add the following description into you web.xml. |
| 8 | * The lines param-name=base-package, param-value=(application base) specifies the location (base package name) where the RequestDispatcher searches recursively for RequestHandler implementations. |
| 9 | * With the following setting, an HTTP request, e.g., http://localhost:8989/hello.action, is mapped to the request handler org.utgenome.gwt.utgb.server.app.Hello class. The upper letters are converted into the lower letters when mapping the request, e.g., Hello action can be accecced via hello.action URL. |
| 10 | * Another example using hierarchies of actions: http://localhost:8989/admin/login.action is mapped to org.utgenome.gwt.utgb.server.Login class. |
| 11 | |
| 12 | {{{ |
| 13 | <servlet> |
| 14 | <servlet-name>dispatcher</servlet-name> |
| 15 | <servlet-class>org.utgenome.gwt.utgb.server.RequestDispatcher</servlet-class> |
| 16 | <init-param> |
| 17 | <param-name>base-package</param-name> |
| 18 | <param-value>(your web application request handler base package. e.g. org.utgenome.gwt.utgb.server.app)</param-value> |
| 19 | </init-param> |
| 20 | </servlet> |
| 21 | |
| 22 | <servlet-mapping> |
| 23 | <servlet-name>dispatcher</servlet-name> |
| 24 | <url-pattern>*.action</url-pattern> |
| 25 | </servlet-mapping> |
| 26 | }}} |
| 27 | |
| 28 | |