In a strust2 + Spring 4 project
Consider a simple action with stream result
This works fine,
Now define a bean
The export will not work correctly any more, first time you get the c:/sample.jks as file and then an error which same stream already closed.
I have found that the sampleStream will be autowired to org.apache.struts2.dispatcher.StreamResult and I see this log:
This mistaken autowired is the source of problem ! Is there any workaround. And by the way, why the sampleStream is autowired here !