Generate Excel Using Spring MVC In this tutorial we are going to learn how to generate Excel File Using Spring Framework + POI library. Article covers Spring application configuration, custom view definition and configuration which is required for Excel file generation. In Spring MVC application, to download a resource such as a file to the browser, you need to do the following in your controller. Use the void return type for your request-handling method and add HttpServletResponse as an argument to the method. Spring MVC download file example January 27, 2017 Spring-MVC No Comments Java Developer Zone This is example of download file using streaming with spring framework. On the Spring side, we cover two approaches to build the CSV file download functionality: Handling CSV generation and download in a separate controller class. This is the simplest and quickest way. The technique employed is similar to the one described in the tutorial: Spring MVC sample application for downloading files. The difference is that.
I am using Spring to create and download Excel sheet I want to add some variable in model in requestiong mapping method so that I can use in other request maping method
Mvc Session Data
As you can see in above
I want to use this model value in my other requestMapping method
how can I use CountAndValueExcel model object that is set by first method in second method with using session? Can I send model object(which contains list of class object) back from view to controller?
Ilya ChumakovLogin Application Using Spring Mvc
1 Answer
You can save an object into a session:
And then you retrieve it like this:
Wrote it from my head, not tested.