Hi there,
I'm using AspectJ along with Struts 2.x .
In one of my action classes I have a private field of type java.io.InputStream
which is used to sent back some data (generated by
net.sf.jasperreports.engine.JasperRunManager.runReportToPdf method) to the
client.
When using the @Around advice (for exception handling manners) the inputstream
is not sent back to the client in response, hence the PDF file is not generated.
public class SomeAction {
………
private InputStream inputStream;
public String print() {
….
setInputStream(net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(….));
}
}
@Around("execution ……… ")
public String methodExecution(CustomAction action, ProceedingJoinPoint
thisJoinPoint) throws Throwable {
try {
thisJoinPoint.proceed();
} catch (Exception e) {
…...
}
The method is working properly with @Before but @Around.
P.S. the aspect is working flawlessly and of course I've omitted the advice
declaration for the sake of a clarity and abstraction here.
Any idea?
Cheers,
Sina _______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users