java - get parameter in servlet for for each loop -


i have jsp page this

<c:foreach var="product" items="${products}" >                                     <div class="col-md-3">                                         <div class="panel-body">                                             <div>                                                 <a href="description.html">                                                     <div class="thumbnail">                                                         <img src="data:image/jpeg;base64,${product.base64encodedimage}" alt="image">                                                         <div class="caption" align="center">                                                             <p>                                                             <h4>${product.name}</h4>                                                             <h5>cost:rs ${product.price}/-</h5> 

i fetch productimage,price,name using each.from each in jsp have parameter values in servlet using request.getparameter() , have implement in page using parameters

i have tumbnails in page.when click on it redirects page.there have set particular tumnails image,product name,price

help me how parameters in servlet class please check image in link--->> i have product name,product price, image 1 tumbnail !

provide hyperlink on image , send details want on servlet query string

 <a href="servletname?name=${product.name}&price=${product.price}">     <img src="data:image/jpeg;base64,${product.base64encodedimage}"  alt="image"/> </a> 

or

send product id , in servlet fetch product details id database

 <a href="servletname?id=${product.id}">         <img src="data:image/jpeg;base64,${product.base64encodedimage}"  alt="image"/>  </a> 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -