Answer the question
In order to leave comments, you need to log in
How to get data from a form?
Hey!!!
I can not pull out the parameters from the form.
request.getParameter("title_ru_RU"); does not work. how to get data out of a form?
<form action="${pageContext.request.contextPath}/do/add-product" method="post" enctype="multipart/form-data">
<p>Название на русском:</p>
<input size="50" type="text" name="title_ru_RU" />
<p>Название на англиском:</p>
<input size="50" type="text" name="title_en_US" />
<p>Описание на русском:</p>
<textarea rows="10" cols="50" name="description_ru_RU"></textarea>
<p>Описание на англиском:</p>
<textarea rows="10" cols="50" name="description_en_US"></textarea>
<p>Тип продукта:</p>
<select name="type">
<option value="PIZZA">${pizza_title}</option>
<option value="SUSHI">${sushi_title}</option>
<option value="DRINK">${drinks_title}</option>
</select>
<p>Цена:</p>
<input type="number" name="price" min="1" />
<p>Картинка:</p>
<input type="file" name="img" />
<p><br>
<input class="product_btn" type="submit" value="Добавить"></p>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question