I suggest you to use both @ActionMapping
and @ResourceMapping
to fulfill your requirement.
As you said you were able to handle the validation
errors using the @ActionResponse
, I'll tell you how to handle the Resource Streaming
.
As you know every @ActionResponse
is followed by a @RenderResponse
, just return the same view but, with a hidden iframe
this time whose src
points to the ResourceURL
.
Now the Request
you receive in @ResourceMapping
is something which is already Validated
. So, you can now serve your CSV
.
I dont know how complex is your UI
and if you are using jsp
as views
in your application. If nicely managed, Validation
can be handled by @ResourceMapping
.
Thank you