struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabrício Garcia Imbrizi <fabricio.imbr...@murah.com.br>
Subject RES: Servlet filter
Date Thu, 03 Jun 2004 12:22:19 GMT
Hi,

Create a generic Action class and for all another Action class created,
extends the generic Action.

Inside generic Action do anything, including authorizations user, log, etc.

The generic Action class has the execute(...) method and the last method
executed is an another execute() ex.: (executeBase(...))

For another created class, define the executeBase(...);

Ex.

public abstract class CentralAction extends Action
{
	public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception
	{
		//do authorizations user, log, etc.

		...

		executeBase(mapping, form, request, response);
	}


	abstract public ActionForward executeBase(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception;

}

public class AnotherClassAction extends BaseAction
{
	public ActionForward executeBase(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception
	{
		...
	}
}


   Regardless

   Fabrício Garcia Imbrizi
   Murah Technologies
   11 8275 0199



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message