on 2019 Jul 12 5:38 PM
Hi,
I have created a new JSP page and I asociated a controller for that new JSP page. I have a method to search information about all the products. I need to now how could I send the information to the JSP, so that I could have a table to show the information for each product.
Note: I was able to print one product information in the storefront. But, I need to print all products.
Please your help.
Thank you!.
Request clarification before answering.
Why is this a problem? It's a pretty straight forward in Spring MVC. You can find several posts on the internet for such a requirement e.g https://stackoverflow.com/questions/43960447/how-to-pass-list-from-controller-to-jsp
Please let me know if you are looking for something else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Victor,
If you are having data related to all the products say List< ProductData> allProducts, pass this data as model Attribute to jsp, and you can iterate this list of ProductData in your jsp to display the information about each product.
Thanks Jeevan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.