title: Can not create drop down list
body: <p>I have to make Relational mapping  between products and brands
  and show it in html</p>
  <p><strong>Entity Class Brand</strong></p>
  <pre><code>         package com.eazytek.Entity;
          
          import lombok.*;
          
          import org.springframework.beans.factory.annotation.Autowired;
          import org.springframework.stereotype.Component;
          
          import javax.persistence.*;
          import java.io.Serializable;
          import java.util.ArrayList;
          import java.util.HashSet;
          import java.util.List;
          import java.util.Set;
          
          @Entity
          @ToString
          @Data
          @AllArgsConstructor
          @NoArgsConstructor
          @Setter
          @Getter
          @EqualsAndHashCode
          @Table(name = &quot;brand&quot;)
          public class Brand implements Serializable {
              @Id
              @GeneratedValue(strategy = GenerationType.IDENTITY)
              @Column(name = &quot;b_Id&quot;)
              private int b_Id;
          
              @Column(name = &quot;b_Name&quot;)
              private String b_Name;
          
              @Column(name = &quot;b_Origin&quot;)
              private String b_Origin;
          
          
          }
  </code></pre>
  <p><strong>Entity Class Product</strong></p>
  <pre><code>       package com.eazytek.Entity;
          
          
          import lombok.*;
          
          import javax.persistence.Entity;
          import javax.persistence.GeneratedValue;
          import javax.persistence.GenerationType;
          import javax.persistence.Id;
          
          @ToString
          @Data
          @AllArgsConstructor
          @NoArgsConstructor
          @Getter
          @Setter
          @Entity
          public class Product {
          
              @Id
              @GeneratedValue(strategy = GenerationType.IDENTITY)
          
              private int pr_Id;
              private String pr_Name;
              private String pr_Type;
          
          }
  </code></pre>
  <p><strong>Brand Repository</strong></p>
  <pre><code>        package com.eazytek.Repository;
          
          import com.eazytek.Entity.Brand;
          import org.springframework.data.jpa.repository.JpaRepository;
          
          
          public interface BrandRepository extends JpaRepository&lt;Brand, 
          Integer&gt; {
       
          }
  </code></pre>
  <p><strong>Product Repository</strong></p>
  <pre><code>    package com.eazytek.Repository;
  
      import com.eazytek.Entity.Product;
      import org.springframework.data.jpa.repository.JpaRepository;
      
  
      public interface ProductRepository extends JpaRepository&lt;Product, 
       Integer&gt; {
      }
  </code></pre>
  <p><strong>Product Service Class</strong></p>
  <pre><code>    package com.eazytek.Service;
  
  
      import com.eazytek.Entity.Product;
      import com.eazytek.Repository.ProductRepository;
      import org.springframework.beans.factory.annotation.Autowired;
      import org.springframework.stereotype.Service;
      
      import java.util.List;
      
      @Service
       public class ProoductService {
      @Autowired
      private ProductRepository prods;
  
      public List&lt;Product&gt; listAll() {
          return prods.findAll();
      }
  
      public void save(Product product) {
          prods.save(product);
      }
  
      public Product get(int pr_Id) {
          return prods.findById(pr_Id).get();
      }
  
      public void delete(int pr_Id) {
          prods.deleteById(pr_Id);
  
  
      }
      }
  </code></pre>
  <p><strong>Brand Service Class</strong></p>
  <pre><code>        package com.eazytek.Service;
          
          import com.eazytek.Entity.Brand;
          import com.eazytek.Repository.BrandRepository;
          import org.springframework.beans.factory.annotation.Autowired;
          import org.springframework.stereotype.Service;
          
          import java.util.List;
          
          @Service
          public class Brandservice {
      
      
          @Autowired
          private BrandRepository repository;
      
          public List&lt;Brand&gt; listAll() {
              return repository.findAll();
          }
      
          public void save(Brand brand) {
              repository.save(brand);
          }
      
          public Brand get(int b_Id) {
              return repository.findById(b_Id).get();
          }
      
          public void delete(int b_Id) {
              repository.deleteById(b_Id);
      
      
          }
          }
  </code></pre>
  <p><strong>Product Model View</strong></p>
  <pre><code>    package com.eazytek.ModelView;
      import com.eazytek.Entity.Product;
      import lombok.Data;
      import javax.persistence.GeneratedValue;
      import javax.persistence.GenerationType;
      import javax.persistence.Id;
      import java.util.ArrayList;
      import java.util.List;
  
  
      @Data
      public class ProductModelView {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
  
      private int pr_Id;
      private String pr_Name;
      private String pr_Type;
  
  
  
       public static ProductModelView ToProductModelView(Product product) {
      ProductModelView productModelView = new ProductModelView();
      if (product.getPr_Id() &gt;= 0) {
          productModelView.setPr_Id(product.getPr_Id());
      }
      productModelView.setPr_Name(product.getPr_Name());
      productModelView.setPr_Type(product.getPr_Type());
  
      return productModelView;
      }
  
       public static Product ToProductModelView(ProductModelView 
      productModelView) {
  
      Product product = new Product();
  
      if (productModelView.getPr_Id() &gt;= 0) {
          product.setPr_Id(productModelView.getPr_Id());
      }
      productModelView.setPr_Name(product.getPr_Name());
      productModelView.setPr_Type(product.getPr_Type());
      return product;
       }
  
       public static List&lt;ProductModelView&gt; ToProductModelView(List&lt;Product&gt; 
       productList) {
  
      List&lt;ProductModelView&gt; productModelViewList = new ArrayList&lt;&gt;();
      for (Product product : productList) {
          ProductModelView productModelView = new ProductModelView();
          productModelView.setPr_Id(product.getPr_Id());
          productModelView.setPr_Name(product.getPr_Name());
          productModelView.setPr_Type(product.getPr_Type());
          productModelView.setPr_Id(product.getPr_Id());
  
      }
      return productModelViewList;
        }
  
  
          }
  </code></pre>
  <p><strong>Brand Model View</strong></p>
  <pre><code>     package com.eazytek.ModelView;
       import com.eazytek.Entity.Brand;
      import lombok.Data;
      import org.springframework.web.servlet.ModelAndView;
      
      import javax.persistence.GeneratedValue;
      import javax.persistence.GenerationType;
      import javax.persistence.Id;
      import java.util.ArrayList;
      import java.util.List;
      
      
      @Data
      public class BrandModelView {
      
          @Id
          @GeneratedValue(strategy = GenerationType.IDENTITY)
          private int b_Id;
          private String b_Name;
          private String b_Origin;
      
          public static BrandModelView ToBrandModelView(Brand brand) {
              BrandModelView brandModelView = new BrandModelView();
              if (brand.getB_Id() &gt;= 0) {
                  brandModelView.setB_Id(brand.getB_Id());
              }
              brandModelView.setB_Name(brand.getB_Name());
              brandModelView.setB_Origin(brand.getB_Origin());
      
      
              return brandModelView;
          }
      
          public static Brand ToBrandsModelXview(BrandModelView 
              brandModelView) {
      
              Brand brand = new Brand();
      
              if (brandModelView.getB_Id() &gt;= 0) {
                  brand.setB_Id(brandModelView.getB_Id());
              }
              brand.setB_Origin(brandModelView.getB_Origin());
              brand.setB_Name(brandModelView.getB_Name());
      
      
              return brand;
          }
      
          public static List&lt;BrandModelView&gt; ToBrandModelYview(List&lt;Brand&gt; 
              brandList) {
      
              List&lt;BrandModelView&gt; brandModelViewList = new ArrayList&lt;&gt;();
              for (Brand brand : brandList) {
                  BrandModelView brandModelView = new BrandModelView();
                  brandModelView.setB_Id(brand.getB_Id());
                  brandModelView.setB_Origin(brand.getB_Origin());
              }
              return brandModelViewList;
          }
      
          private ModelAndView getModelAndView(BrandModelView 
                    brandModelView) {
              ModelAndView modelAndView = new ModelAndView(&quot;brand_add&quot;);
              modelAndView.addObject(&quot;brandModelView&quot;, brandModelView);
              return modelAndView;
          }
      }
      
      
      
  </code></pre>
  <p><strong>Product Controller</strong></p>
  <pre><code>               package com.eazytek.Controller;
          import com.eazytek.Entity.Product;
          import com.eazytek.ModelView.ProductModelView;
          import com.eazytek.Service.ProoductService;
          import org.springframework.beans.factory.annotation.Autowired;
          import org.springframework.stereotype.Controller;
          import org.springframework.ui.Model;
          import org.springframework.web.bind.annotation.ModelAttribute;
          import org.springframework.web.bind.annotation.PathVariable;
          import org.springframework.web.bind.annotation.RequestMapping;
          import org.springframework.web.bind.annotation.RequestMethod;
          import org.springframework.web.servlet.ModelAndView;
  
          import java.util.List;
  
          @Controller
          public class ProductController {
  
            @Autowired
  
            private ProoductService prooductService;
  
  
              @RequestMapping(&quot;/product&quot;)
              public String viewProductHome(Model model) {
            List&lt;Product&gt; productList = prooductService.listAll();
            model.addAttribute(&quot;productList&quot;, productList);
  
          return &quot;product_index&quot;;
        }
  
         private ModelAndView getModelAndView(ProductModelView 
           productModelView) {
          ModelAndView modelAndView = new ModelAndView(&quot;product_add&quot;);
          modelAndView.addObject(&quot;productModelView&quot;, productModelView);
          return modelAndView;
      }
  
  
          private ModelAndView ToProductModelView(ProductModelView 
          productModelView) {
          ModelAndView modelAndView = new ModelAndView(&quot;product_add&quot;);
          modelAndView.addObject(&quot;productModelView&quot;, productModelView);
          return modelAndView;
      }
  
          @RequestMapping(&quot;/new_product&quot;)
          public String shoeNewBrandFrom(Model model) {
          Product product = new Product();
          model.addAttribute(&quot;product&quot;, product);
          return &quot;product_add&quot;;
  
      }
  
  
          @RequestMapping(value = &quot;/save_product&quot;, method = 
          RequestMethod.POST)
          public String saveProductPage(@ModelAttribute(&quot;product&quot;) Product 
              product) {
              prooductService.save(product);
  
  
          return &quot;redirect:/product&quot;;
      }
  
  
      @RequestMapping(&quot;/edit_product/{pr_Id}&quot;)
      public ModelAndView showEditProductPage(@PathVariable(name = &quot;pr_Id&quot;) 
          int pr_Id) {
          ModelAndView mav = new ModelAndView(&quot;product_edit&quot;);
          Product product = prooductService.get(pr_Id);
          mav.addObject(&quot;product&quot;, product);
  
          return mav;
      }
  
      @RequestMapping(&quot;/delete_product/{pr_Id}&quot;)
      public String deleteProduct(@PathVariable(name = &quot;pr_Id&quot;) int pr_Id) {
          prooductService.delete(pr_Id);
          return &quot;redirect:/product&quot;;
      }
  
  
  }
  </code></pre>
  <p><strong>Brand Controller</strong></p>
  <pre><code>    package com.eazytek.Controller;
      import com.eazytek.Entity.Brand;
      import com.eazytek.ModelView.BrandModelView;
      import com.eazytek.Service.Brandservice;
      import org.springframework.beans.factory.annotation.Autowired;
      import org.springframework.stereotype.Controller;
      import org.springframework.ui.Model;
      import org.springframework.web.bind.annotation.ModelAttribute;
      import org.springframework.web.bind.annotation.PathVariable;
      import org.springframework.web.bind.annotation.RequestMapping;
      import org.springframework.web.bind.annotation.RequestMethod;
      import org.springframework.web.servlet.ModelAndView;
  
      import java.util.List;
      
      @Controller
      
      public class BrandController {
  
  
      @Autowired
      private Brandservice service;
      private Brand brand;
  
  
      @RequestMapping(&quot;/&quot;)
      public String viewProductPage(Model model) {
          List&lt;Brand&gt; brandList = service.listAll();
          model.addAttribute(&quot;brandList&quot;, brandList);
          return &quot;index&quot;;
      }
  
      private ModelAndView getModelAndView(BrandModelView brandModelView) {
          ModelAndView modelAndView = new ModelAndView(&quot;brand_add&quot;);
          modelAndView.addObject(&quot;brandModelView&quot;, brandModelView);
          return modelAndView;
      }
  
      @RequestMapping(&quot;/new_brand&quot;)
      public String shoeNewBrandFrom(Model model) {
          Brand brand = new Brand();
          model.addAttribute(&quot;brand&quot;, brand);
          return &quot;index_add&quot;;
  
      }
  
  
      @RequestMapping(value = &quot;/save_brand&quot;, method = RequestMethod.POST)
      public String saveBrandxPage(@ModelAttribute(&quot;brand&quot;) Brand brand) {
          service.save(brand);
  
  
          return &quot;redirect:/&quot;;
      }
  
  
      @RequestMapping(&quot;/edit_brand/{b_Id}&quot;)
      public ModelAndView showEditProductPage(@PathVariable(name = &quot;b_Id&quot;) 
           int 
          b_Id) {
          ModelAndView mav = new ModelAndView(&quot;index_edit&quot;);
          Brand brand = service.get(b_Id);
          mav.addObject(&quot;brand&quot;, brand);
  
          return mav;
      }
  
      @RequestMapping(&quot;/delete_brand/{b_Id}&quot;)
      public String deleteProduct(@PathVariable(name = &quot;b_Id&quot;) int b_Id) {
          service.delete(b_Id);
          return &quot;redirect:/&quot;;
      }
  
  
      }
  </code></pre>
  <p><strong>Html Views Entry point</strong></p>
  <pre><code>        &lt;!DOCTYPE html&gt;
      &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
        xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;
      &lt;head&gt;
  
          &lt;title&gt;Document&lt;/title&gt;
          &lt;title&gt;Product Manager&lt;/title&gt;
      &lt;/head&gt;
          &lt;body style=&quot;background-color: bisque&quot;&gt;
          &lt;div align=&quot;center&quot;&gt;
              &lt;header id=&quot;main-header&quot; class=&quot;bg-success text-white p-4 mb- 
                    3&quot;&gt;
                  &lt;div class=&quot;container&quot;&gt;
                      &lt;h1 id=&quot;header-title&quot;&gt;One to Many &lt;span 
              style=&quot;display:none&quot;&gt;123&lt;/span&gt;&lt;/h1&gt;
                  &lt;/div&gt;
              &lt;/header&gt;
              &lt;div class=&quot;container&quot;&gt;
          &lt;div id=&quot;main&quot; class=&quot;card card-body&quot;&gt;
              &lt;h1 style=&quot;color:green    &quot;&gt;Store Manager Admin&lt;/h1&gt;
              &lt;h2 style=&quot;color:green&quot;&gt;Store View&lt;/h2&gt;
              &lt;h1&gt;Product Resource&lt;/h1&gt;
              &lt;a href=&quot;/new_brand&quot;&gt;Add Brand to Shop &lt;/a&gt;
              &lt;a href=&quot;/product&quot;&gt;Add Product to store &lt;/a&gt;
              &lt;a href=&quot;/&quot;&gt;To_Home&lt;/a&gt;
              &lt;br/&gt;&lt;br/&gt;
              &lt;/div&gt;
              &lt;/div&gt;
              &lt;div align=&quot;center&quot;&gt;
              &lt;table border=&quot;1&quot; width=&quot;82%&quot; align=&quot;center&quot; cellpadding=&quot;5&quot;&gt;
              &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Brand ID&lt;/th&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Origin&lt;/th&gt;
  
                  &lt;th&gt;Actions&lt;/th&gt;
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
              &lt;tr th:each=&quot;brand : ${brandList }&quot;&gt;
  
                  &lt;td th:text=&quot;${brand.b_Id}&quot;&gt;Brand ID&lt;/td&gt;
                  &lt;td th:text=&quot;${brand.b_Name}&quot;&gt;Name&lt;/td&gt;
                  &lt;td th:text=&quot;${brand.b_Origin}&quot;&gt;Origin&lt;/td&gt;
  
                  &lt;td&gt;
  
                      &lt;a th:href=&quot;@{'/edit_brand/' + 
                     ${brand.b_Id}}&quot;&gt;Edit&lt;/a&gt;
                      &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a th:href=&quot;@{'/delete_brand/' + 
                  ${brand.b_Id}}&quot;&gt;Delete&lt;/a&gt;&gt;
                      &lt;a th:href=&quot;@{'/Sales/' + ${brand.b_Id}}&quot;&gt;Shop&lt;/a&gt;
  
                  &lt;/td&gt;
                 &lt;/tr&gt;
                 &lt;/tbody&gt;
                &lt;/table&gt;
  
                                &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;script src=&quot;js/jquery.js&quot;&gt;&lt;/script&gt;
                  &lt;script src=&quot;js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
                                  &lt;/div&gt;
  
                  &lt;/body&gt;
                  &lt;/html&gt;
  
         **Html page To Add a brand to the table and MySql**
  
          &lt;!DOCTYPE html&gt;
      &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
        xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;
      &lt;head&gt;
  
          &lt;title&gt;Document&lt;/title&gt;
          &lt;title&gt;Product Manager&lt;/title&gt;
      &lt;/head&gt;
          &lt;body style=&quot;background-color: bisque&quot;&gt;
          &lt;div align=&quot;center&quot;&gt;
              &lt;header id=&quot;main-header&quot; class=&quot;bg-success text-white p-4 mb- 
                      3&quot;&gt;
                  &lt;div class=&quot;container&quot;&gt;
                      &lt;h1 id=&quot;header-title&quot;&gt;One to Many &lt;span 
             style=&quot;display:none&quot;&gt;123&lt;/span&gt;&lt;/h1&gt;
                  &lt;/div&gt;
              &lt;/header&gt;
              &lt;div class=&quot;container&quot;&gt;
          &lt;div id=&quot;main&quot; class=&quot;card card-body&quot;&gt;
              &lt;h1 style=&quot;color:green    &quot;&gt;Store Manager Admin&lt;/h1&gt;
              &lt;h2 style=&quot;color:green&quot;&gt;Store View&lt;/h2&gt;
              &lt;h1&gt;Product Resource&lt;/h1&gt;
              &lt;a href=&quot;/new_brand&quot;&gt;Add Brand to Shop &lt;/a&gt;
              &lt;a href=&quot;/product&quot;&gt;Add Product to store &lt;/a&gt;
              &lt;a href=&quot;/&quot;&gt;To_Home&lt;/a&gt;
              &lt;br/&gt;&lt;br/&gt;
              &lt;/div&gt;
              &lt;/div&gt;
              &lt;div align=&quot;center&quot;&gt;
              &lt;table border=&quot;1&quot; width=&quot;82%&quot; align=&quot;center&quot; cellpadding=&quot;5&quot;&gt;
              &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Brand ID&lt;/th&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Origin&lt;/th&gt;
                  &lt;th&gt;Actions&lt;/th&gt;
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
              &lt;tr th:each=&quot;brand : ${brandList }&quot;&gt;
  
                  &lt;td th:text=&quot;${brand.b_Id}&quot;&gt;Brand ID&lt;/td&gt;
                  &lt;td th:text=&quot;${brand.b_Name}&quot;&gt;Name&lt;/td&gt;
                  &lt;td th:text=&quot;${brand.b_Origin}&quot;&gt;Origin&lt;/td&gt;
  
                  &lt;td&gt;
  
                      &lt;a th:href=&quot;@{'/edit_brand/' + 
                    ${brand.b_Id}}&quot;&gt;Edit&lt;/a&gt;
                      &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a th:href=&quot;@{'/delete_brand/' + 
                ${brand.b_Id}}&quot;&gt;Delete&lt;/a&gt;&gt;
                      &lt;a th:href=&quot;@{'/Sales/' + ${brand.b_Id}}&quot;&gt;Shop&lt;/a&gt;
  
                  &lt;/td&gt;
                 &lt;/tr&gt;
                 &lt;/tbody&gt;
                &lt;/table&gt;
  
                                &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;script src=&quot;js/jquery.js&quot;&gt;&lt;/script&gt;
                  &lt;script src=&quot;js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
                                  &lt;/div&gt;
  
                  &lt;/body&gt;
                  &lt;/html&gt;
  
      **Html Page to Edit the Data On the Brand Table**
              &lt;!DOCTYPE html&gt;
            &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
                xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;
          &lt;head&gt;
              &lt;meta charset=&quot;utf-8&quot;/&gt;
              &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial- 
                    scale=1.0&quot;&gt;
             
          
              &lt;title&gt;Document&lt;/title&gt;
              &lt;title&gt;Product Manager&lt;/title&gt;
          
          
          &lt;/head&gt;
          &lt;meta charset=&quot;utf-8&quot;/&gt;
          &lt;title&gt;Create New Product&lt;/title&gt;
          &lt;/head&gt;
          &lt;body background=&quot;&quot;&gt;
          &lt;div align=&quot;center&quot;&gt;
              &lt;header id=&quot;main-header&quot; class=&quot;bg-success text-white p-4 mb- 
               3&quot;&gt;
                  &lt;div class=&quot;container&quot;&gt;
                      &lt;h1 id=&quot;header-title&quot;&gt;One to Many &lt;span 
                   style=&quot;display:none&quot;&gt;123&lt;/span&gt;&lt;/h1&gt;
                  &lt;/div&gt;
              &lt;/header&gt;
              &lt;h1&gt;Create New Product&lt;/h1&gt;
              &lt;br/&gt;
              &lt;form action=&quot;#&quot; th:action=&quot;@{/save_brand}&quot; 
               th:object=&quot;${brand}&quot;
                    method=&quot;post&quot;&gt;
          
                  &lt;table border=&quot;0&quot; cellpadding=&quot;12&quot;&gt;
          
          
                      &lt;tr&gt;
                          &lt;td&gt;Brand Id:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Id}&quot;/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
          
          
                      &lt;tr&gt;
                          &lt;td&gt; Name:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Name}&quot;/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;Origin:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Origin}&quot;/&gt; 
                       &lt;/td&gt;
                      &lt;/tr&gt;
          
                      &lt;td colspan=&quot;2&quot;&gt;
                          &lt;button type=&quot;submit&quot;&gt;Save&lt;/button&gt;
                      &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;/body&gt;
          &lt;/html&gt;
  
        
  </code></pre>
  <p>**Html Page Display of product **</p>
  <pre><code>        &lt;!DOCTYPE html&gt;
          &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
                xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;
          &lt;head&gt;
              &lt;meta charset=&quot;utf-8&quot;/&gt;
              &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial- 
                    scale=1.0&quot;&gt;
  
              &lt;title&gt;Document&lt;/title&gt;
              &lt;title&gt;Product Manager&lt;/title&gt;
          &lt;/head&gt;
          &lt;body style=&quot;background-color: bisque&quot;&gt;
          &lt;div align=&quot;center&quot;&gt;
              &lt;header id=&quot;main-header&quot; class=&quot;bg-success text-white p-4 mb- 
                       3&quot;&gt;
                  &lt;div class=&quot;container&quot;&gt;
                      &lt;h1 id=&quot;header-title&quot;&gt;One to Many &lt;span 
                         style=&quot;display:none&quot;&gt;123&lt;/span&gt;&lt;/h1&gt;
                  &lt;/div&gt;
              &lt;/header&gt;
              &lt;div class=&quot;container&quot;&gt;
                  &lt;div id=&quot;main&quot; class=&quot;card card-body&quot;&gt;
          
                      &lt;h1 style=&quot;color:green    &quot;&gt;Store Manager &lt;/h1&gt;
                      &lt;h2 style=&quot;color:green&quot;&gt;Store View&lt;/h2&gt;
                      &lt;h1&gt;Product Resource&lt;/h1&gt;
                      &lt;a href=&quot;/new_product&quot;&gt;Add Product To Store &lt;/a&gt;
                      &lt;a href=&quot;/&quot;&gt;To_Home&lt;/a&gt;
                      &lt;br/&gt;&lt;br/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div align=&quot;center&quot;&gt;
                  &lt;table border=&quot;1&quot; width=&quot;82%&quot; align=&quot;center&quot; 
                           cellpadding=&quot;5&quot;&gt;
                      &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Product ID&lt;/th&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                          &lt;th&gt;Type&lt;/th&gt;
                          &lt;th&gt;Actions&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
                      &lt;tr th:each=&quot;product : ${ productList}&quot;&gt;
                          &lt;td th:text=&quot;${product.pr_Id}&quot;&gt;Product ID&lt;/td&gt;
                          &lt;td th:text=&quot;${product.getPr_Name()}&quot;&gt;Name&lt;/td&gt;
                          &lt;td th:text=&quot;${product.pr_Type}&quot;&gt;Type&lt;/td&gt;
                          &lt;td&gt;
                              &lt;a th:href=&quot;@{'/edit_product/' + 
                     ${product.pr_Id}}&quot;&gt;Edit&lt;/a&gt;
                              &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a 
                            th:href=&quot;@{'/delete_product/' + 
                                    ${product.pr_Id}}&quot;&gt;Delete&lt;/a&gt;&gt;
                              &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a 
                                           th:href=&quot;@{'/sell_product/' +                                       
                                           ${product.pr_Id}}&quot;&gt;Sell&lt;/a&gt;&gt;
          
          
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
          
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/div&gt;
          
          &lt;script src=&quot;js/jquery.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
          &lt;/div&gt;
          
          &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>
  <p><strong>html page to Add a new Brand to the brand table</strong></p>
  <pre><code>            &lt;!DOCTYPE html&gt;
          &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
                xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;
          &lt;head&gt;                                    
              &lt;meta charset=&quot;utf-8&quot;/&gt;
  
  
              &lt;title&gt;Document&lt;/title&gt;
              &lt;title&gt;Product Manager&lt;/title&gt;
  
  
          &lt;/head&gt;
          &lt;meta charset=&quot;utf-8&quot;/&gt;
          &lt;title&gt;Create New Product&lt;/title&gt;
          &lt;/head&gt;
          &lt;body background=&quot;&quot;&gt;
          &lt;div align=&quot;center&quot;&gt;
              &lt;header id=&quot;main-header&quot; class=&quot;bg-success text-white p-4 mb- 
                3&quot;&gt;
                  &lt;div class=&quot;container&quot;&gt;
                      &lt;h1 id=&quot;header-title&quot;&gt;One to Many &lt;span
                              style=&quot;display:none&quot;&gt;123&lt;/span&gt;&lt;/h1&gt;
                  &lt;/div&gt;
              &lt;/header&gt;
              &lt;h1&gt;Create New Product&lt;/h1&gt;
              &lt;br/&gt;
              &lt;form action=&quot;#&quot; th:action=&quot;@{/save_brand}&quot; 
                    th:object=&quot;${brand}&quot;
                    method=&quot;post&quot;&gt;
  
                  &lt;table border=&quot;0&quot; cellpadding=&quot;12&quot;&gt;
  
  
                      &lt;tr&gt;
                          &lt;td&gt;Brand Id:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Id}&quot;/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
  
  
                      &lt;tr&gt;
                          &lt;td&gt; Name:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Name}&quot;/&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;Origin:&lt;/td&gt;
                          &lt;td&gt;&lt;input type=&quot;text&quot; th:field=&quot;*{b_Origin}&quot;/&gt; 
                   &lt;/td&gt;
                      &lt;/tr&gt;
  
                      &lt;td colspan=&quot;2&quot;&gt;
                          &lt;button type=&quot;submit&quot;&gt;Save&lt;/button&gt;
                      &lt;/td&gt;
  
  
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>