|
August 26, 2004
Let your Struts DispatchActions Fall through
This is nice, because now you can have a default behavior on dispatch actions.
public class BaseAction extends DispatchAction
{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
String method = request.getParameter(mapping.getParameter());
if (method != null)
{
return dispatchMethod(mapping, form, request, response, method);
}
else
{
return mapping.findForward("success");
}
}
}
Posted by Andre Mermegas at 12:21 PM
| Comments (0)
| TrackBack
|
February 2005
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
1 |
2 |
3 |
4 |
5 |
|
6 |
7 |
8 |
9 |
10 |
11 |
12 |
|
13 |
14 |
15 |
16 |
17 |
18 |
19 |
|
20 |
21 |
22 |
23 |
24 |
25 |
26 |
|
27 |
28 |
|
|
|
|
|
|
|
|
|
|