PDA

View Full Version : Weblogic 9.2 UNIX Platform error using spring bind tags


kin_o
Apr 26th, 2007, 01:47 PM
I am getting an error when using spring bind on weblogic 9.2 servlet2.4 and jstl 1.1.
Below is the jsp
===========================

<spring:bind path="tradeDateFrom">
<span title="ddMMyyyy">
<c:choose>
<c:when test='${empty status.value}'>
<input name="<c:out value='${status.expression}'/>" id="tradeDateFrom" size="10" class="clsTextBox" maxlength="10" value="<c:out value='${tradeInfo.yesterday}'/>" type="text" onChange="return isDate_val(this,'tradeDateFromDiv',true,'tradeDate From');" onBlur="return isDate_val(this,'tradeDateFromDiv',true,'tradeDate From');">
</c:when>
<c:otherwise>
<input name="<c:out value='${status.expression}'/>" id="tradeDateFrom" size="10" class="clsTextBox" maxlength="10" value="<c:out value='${status.value}'/>" type="text" onChange="return isDate_val(this,'tradeDateFromDiv',true,'tradeDate From');" onBlur="return isDate_val(this,'tradeDateFromDiv',true,'tradeDate From');">
</c:otherwise>
</c:choose>
</span>


<script type="text/javascript">
Calendar.setup({
inputField : "tradeDateFrom", // id of the input field
ifFormat : "%d%m%Y", // format of the input field
button : "trade_date_img", // trigger for the calendar (button ID)
align : "Tl", // alignment (defaults to "Bl")
singleClick : true
});
</script>
</spring:bind>




And the error from weblogic is
java.lang.ClassCastException: javax.servlet.jsp.jstl.core.LoopTagSupport$1Status

at jsp_servlet._web_45_inf._jsp.__search._jspService( __search.
java:1259)
at weblogic.servlet.jsp.JspBase.service(JspBase.java: 34)
at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run
(StubSecurityHelper.java:225)
at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecuri
tyHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.jav
a:283)

Has anyone seen this before need your help. Thanks in advance.

jglynn
Apr 29th, 2007, 03:03 PM
I found that same bug; the spring bind tag is looking for a bind status variable named "status" inside a foreach loop with a varStatus named "status" and it's finding the LoopTagSupportsStatus object instead.

If you change your foreach loop tag to use a varStatus with a name other than "status" this issue will go away. I believe they resolved this in 2.0.4 but I haven't personally confirmed this.

kin_o
Apr 30th, 2007, 05:50 AM
Thanks :) :) :) :)
worked renaming the varStatus of all foreach loops from status.