图片上传 如何获得form里面的值

<form name="fileForm" id="fileForm" action="${pageContext.request.contextPath}/Processes?action=upLoadImg&className=SearchUploadServlet" onsubmit="return check();" method="post" enctype="multipart/form-data" >
    <table>
        <c:if test="${uploadFileName !=null}">
            <tr>
                <td>
                    <img width='200px' title="" height='200px;'  src="${pageContext.request.contextPath}/searchupload${uploadFileName }"> 
                    <p style="color:red;">${errorMessage }</p>
                </td>
            </tr>
        </c:if>
        <tr>
            <td>
                请选择上传的图片或文件:<input type="file" name="fileName" id="fileName" accept="image/jpeg,image/png,image/gif" onchange="return fnSubmit();"/>
            </td>

        </tr>
        <tr>
            <td>大类索引
                <select id="maxSelect" style="width:200px" onchange="fnSelect(this.value)" > 
                            <option selected="selected"></option>
                     <c:forEach var="largeIndexList" items="${largeIndexList}">
                        <c:if test="${maxSelectId==largeIndexList.indexName}">
                            <option value="${largeIndexList.indexName}" selected="selected">${largeIndexList.indexNameCn}</option>
                        </c:if>
                        <c:if test="${maxSelectId!=largeIndexList.indexName}">
                            <option value="${largeIndexList.indexName}">${largeIndexList.indexNameCn}</option> 
                        </c:if>
                     </c:forEach>
              </select>
              <input type="hidden" id="selectId" name ="selectId">
            </td>
            <td>
                <input  type="button" value="搜索" onclick="subMit();"/> 
                <input type="hidden" id="uploadImg" name ="uploadImg" value="${uploadFileName }">
            </td>
        </tr>
    </table> 
</form>

后台servlet如何获得selectId的值

在select中写name,servlet根据name可以获取option的value

这个可以用js获取值然后传给后台

$('#maxSelect').val()

这个和一般的text文本框是一样的,,通过name传值,,servlet中request.getParameter()就可以获取了

每一项都写好属性name,然后在servlet中request.getParameter(String Key)中获取