Re: Struts 2 defining a base action

2014-02-26 Thread Christoph Nenning
Basically it is better to reuse code via interceptors, not action base classes. You can have a look at JSONValidationInterceptor for an example how an interceptor can create a result. In your case you could define an interface Exportable which actions have to implement and your interceptor can

Struts 2 defining a base action

2014-02-25 Thread Alireza Fattahi
We are creating a base action to manage export function. This base class deals with file name and content type. public class public abstract class AbstractExportAction{ //Will be override protected abstract InputStream exportInputStream() ; @Action(value = "export", results = { @Result(name = "