-1

I have form in jsp

<table border="1">
<c:forEach items="${sessionScope.proizvodList}" var="proiz">
    <tr>
    <td>${proiz.sifra}</td> 
    <td> ${proiz.naziv}</td>
    <td>${proiz.boja}</td>
    <td>${proiz.dimenzije}</td>
    <td>${proiz.tezina}</td>
    <td><form action="KupiServlet" method="get">
        <input type="text" name="kolicina"/>
        <input type="hidden" name="id" value="${proiz.sifra}"/>
        <input type="submit" value="Kupi"/>
        </form>
    </td>
    </tr>

and in servlet in doGet method,i have

    String id=request.getParameter("id");
    String kol=request.getParameter("kolicina");

When I run this,i got error that both id and kol are null,so i guess servlet doesn't get these parameters..but i think that my form looks good..Does someone have idea why this happens?Thanks in advance!

slomil
  • 193
  • 1
  • 4
  • 12

1 Answers1

-1

Check this link - you cannot have a form inside a form.

Is it valid to have a html form inside another html form?

Community
  • 1
  • 1
Gowtham
  • 364
  • 2
  • 5
  • 16