How can I make it into a controller to receive data via Post (in Spring MVC) and save this data to a TXT?
Later, in the Model open this TXT and send to View.
Would anyone have an example?
How can I make it into a controller to receive data via Post (in Spring MVC) and save this data to a TXT?
Later, in the Model open this TXT and send to View.
Would anyone have an example?
Create a method in your control that receives a post type request with the data you want to save as a parameter. Create a TxtDAO for the CRUD you want to perform on top of this txt. The request delivers to the controller that delivers to the dao, this applies the action you want and returns you the result. Actually, it's the same analogy I would do in a DAO for database, so in the connector, instead of having a database, you would build DAO to file.