FileDocCategorySizeDatePackage
TestAction2.javaAPI DocExample1224Sun Aug 15 12:59:36 BST 2004com.oreilly.strutsckbk.ch09

TestAction2

public class TestAction2 extends org.apache.struts.action.Action

Fields Summary
Constructors Summary
Methods Summary
private voidcallService()

        
    
public org.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


        try {
            callService();
        } catch (ErrorCodeException ece) {
            switch (ece.getCode()) {
                case -1:
                    return mapping.findForward("somewhere.jsp");
                case 100:
                    // do something
                case 110:
                    // do something else
            }
            throw ece;
        }
        return mapping.findForward("success");