How to debug Spring web thread that does nothing and throws no exceptions
I have a spring 2.5 application and several pages in the flow work fine - they develop according to my flow.xml. The broken page has the following form:
<input type="image" name="_eventId_submit" src="<c:url value="images/continue.png" />" />
the flow definition for this page looks correct:
<view-state id="coverages" view="tiles.coverages" model="rtrForm">
<on-entry>
...
</on-entry>
<transition on="submit" to="policyVehicleDetailsDecisionForward">
<evaluate expression="coverageFormAction.bindAndValidate" />
<evaluate expression="coverageFormAction.evaluateCoverages(rtrForm)" />
</transition>
</view-state>
I have debug instructions in mainFlowAction.evaluateCoverages (...) and I don't see this in the log file, but I also don't see any exceptions - does anyone know where to go from here? I've connected eclipse to Tomcat 6.0.33 to do remote debugging and I still don't see any exceptions thrown all over the cable ... I'm stumped and don't know how to figure this out - any help or suggestions would be appreciated.
So I took it a few steps further and I overridden the QuoteFormAction.bindAndValidate () method and unfortunately I don't see this method being called in the logs, so I'm assuming at this point that the form isn't even calling that .. I am using the same template that I have for all pages that work. I have shortened the form - perhaps I am not seeing anything obvious:
<form id="rtrForm" action="/rtrSite/main.svc?execution=e1s5" method="post">
...
<select name="quoteForm.policyLevelCoverages.towing" class="violationType" id="TOWING" validate="selectOneOption" req="">
...
<select name="quoteForm.vehicleLevelCoverages[0].rental" class="violationType" id="RENTAL" validate="selectOneOption" req="">
...
<input type="image" name="_eventId_submit" src="images/continue.png" />
<input type="image" name="_eventId_save" src="images/save.png" value='Save -n- Return' />
<input type="image" src="images/back.png" name="_eventId_back" value='Back' />
<input type="reset" id="reset" />
</form>
Generating JSP Form:
<c:forEach var="policyCoverageList" varStatus="policyCoverageStatus" items="${quoteForm.coverages.jspCoverageCodesPolLevel}">
<spring:bind path="quoteForm.policyLevelCoverages.${fn:toLowerCase(policyCoverageList.coverageCode)}" >
<select name="${status.expression}" class="violationType" id="${policyCoverageList.coverageCode}" validate="selectOneOption" req="">
<c:if test="${policyCoverageList.isRequired == 'N'}">
<option value="-1"><spring:message code="coverage.decline" /></option>
</c:if>
<c:forEach var="policyCoverage" items="${policyCoverageList.limits}">
<option value="${policyCoverage.id}" <c:if test="${policyCoverage == 'TODO'}">SELECTED</c:if>>
${policyCoverage.coverageLimits}
</option>
</c:forEach>
</select>
</spring:bind>
</c:forEach>
source to share
Does it go back to the view "tiles.coverages"
every time? If so, I would assume you have some kind of binding / validation errors. In jsp, enter <form:errors path="*"/>
to see if it is valid.
Edit:
Are these two choices not null and the second one is not empty? So for
quoteForm.vehicleLevelCoverages[0].rental
Is there at least one element in the VehicleLoverCoverages list / array?
On the one hand, no:
Are you using Spring Weblflow 2? If you don't need to do bindAndValidate, this is still for you.
source to share