Здравствуйте.
Пытаюсь в сервлете получить значение из формы
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<form method="POST" action="DinamicInsertInOracle" enctype="multipart/form-data">
<div class="container">
<form class="row">
<br><br><br>
<table class="table">
<TR>
<td colspan="2"> Должно быть так
<div class="row">
<div class="col-lg-8">
<div class="input-group">
<select class="selectpicker show-tick form-control" >
<c:forEach var="row" items="${rs_derection.rows}">
<c:set var="DIRECTION" value="${row.DIRECTION}"/>
<optgroup label=${DIRECTION}>
<c:forEach var="row" items="${rs_position.rows}">
<c:set var="POSITION" value="${row.POSITION}"/>
<option >${POSITION}</option>
</c:forEach>
</optgroup>
</c:forEach>
</select>
<!-- /btn-group -->
</div>
</div>
</div>
<c:set var="SCRIPT">
select * from crm.PARAMETERS
</c:set>
<sql:query var="parameters" dataSource="jdbc/DBOracle">
${SCRIPT}
</sql:query>
<table>
<TR>
<td>
<div class="panel panel-default">
<div class="panel-heading">Основные показатели</div>
<table class="table">
<c:forEach var="row" items="${parameters.rows}">
<c:set var="ID" value="${row.NUM}"/>
<c:set var="SOLUTION" value="${row.SOLUTION}"/>
<c:set var="PARAMETER_VALUE" value="${row.VALUE}"/>
<tr>
<td> <input type="checkbox" NAME="CHECKBOX_${ID}"></td> <td style="width:50%">${SOLUTION}</td>
<td><div class="input-group"><input type="text" class="form-control" NAME="TEXT_${ID}" value="${PARAMETER_VALUE}"> <span class="input-group-addon">,%</span> </div></td>
<td>CHECKBOX_${ID} TEXT_${ID}</td>
</tr>
</c:forEach>
</table>
<div class="modal-footer">
<!-- <button type="button" class="btn btn-info" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i> Close</button> -->
<button value="Save" class="btn btn-success" type="submit" id="submit"><i class="glyphicon glyphicon-inbox"></i> Сохранить</button>
</div>
</div>
</td>
</TR>
</form>
В сервлете пытаюсь получить это значение
@WebServlet(
name = "DinamicInsertInOracle",
description = "Insert Data To DB",
urlPatterns = "/check_db/DinamicInsertInOracle"
)
public class DinamicInsertInOracle extends HttpServlet {
private String dbURL = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=хост)(PORT=123)))(CONNECT_DATA=(SERVICE_NAME=сири)))";
private String dbUser = "имя";
private String dbPass = "пароль";
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
// gets values of text fields
String TEXT_ALL = request.getParameter("TEXT_1");
но получаю NULL при том что специально присваиваю
value="${PARAMETER_VALUE}"
В чем может быть ошибка?