Mark Galbreath wrote: > Anyway, I need to pass control from one class to another in a web app > something like: > > public String getNextPage() throws Exception { > Command nextCommand = new ListEquipmentAction(); > nextCommand.setAttributes( this); > nextCommand.execute(); > > return nextCommand.getNextPage(); > > > How do I go about doing this in the form: > > return( mapping.findForward( "success"));
In your Action: public ActionForward perform(...) { request.setAttribute(key, this); return (mapping.findForward("success")); } The mapping "success" is defined in /WEB-INF/struts-config.xml. The mapping can point to another class (Action) that will do somethinng different. So basically when someone requests a page, your Action gets control, it does some processing, sets whatever attributes it needs to set, and then forwards control on to something else. What that something else is defined in /WEB-INF/struts-config.xml. Hope that helps. I'm sure the Struts gurus will chime in to clarify... ;) -Another Mark -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>