Skip to content Skip to sidebar Skip to footer

Parametersinterceptor Error: Unexpected Exception Caught, Error Setting Expression

I have a table inside a form that contains dropdowns and a hidden input. JSP:

Solution 1:

You don't need to submit all ids of the table. Because you don't want to convert profId to a list or array. Use a separate form for each record.

<table>
    <thead class="center">
        <tr>
            <!-- column names here -->
        </tr>
    </thead>

    <tbody>
        <c:forEach var="professor" items="${facultyList}">
          <tr><td>
          <form action="modifyfaculty" method="post">
          <table>
            <tr>
                <!-- more <td> -->

                <td align="center">
                    <c:choose>
                        <c:when test="${professor.profEmplStatus.equals('FULL')}">
                            <select name="profEmplStatus" required>
                                <option value="FULL" selected>FULL</option>
                                <option value="PART">PART</option>
                                <option value="RET">RET</option>
                                <option value="TRMTD">TRMTD</option>
                            </select>
                        </c:when>

                        <!-- more <c:when> blocks -->
                    </c:choose>
                </td>

                <td align="center">
                    <c:choose>
                        <c:when test="${professor.profDept.equals('BSCS-SE')}">
                            <select name="profDept" required>
                                <option value="BA-MMA">BA-MMA</option>
                                <option value="BFDT">BFDT</option>
                                <option value="BS-AN">BS-AN</option>
                                <option value="BS-GPD">BS-GPD</option>
                                <option value="BSBA-FM">BSBA-FM</option>
                                <option value="BSBA-MKT">BSBA-MKT</option>
                                <option value="BSCS-SE" selected>BSCS-SE</option>
                                <option value="BSIT-WD">BSIT-WD</option>
                                <option value="GENED">GENED</option>
                            </select>
                        </c:when>

                        <!-- more <c:when> blocks -->
                    </c:choose>
                </td>

                <td class="center">
                    <input type="hidden" name="profId" value="${professor.profId}" />
                    <input type="submit" value="Save" />
                </td>
            </tr>
           </table>
          </form>
         </td></tr>
        </c:forEach>
    </tbody>
</table>

Post a Comment for "Parametersinterceptor Error: Unexpected Exception Caught, Error Setting Expression"