users@glassfish.java.net

Implicit objects are not supporting while binding using spring in GlassFish

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Jun 2009 03:21:56 PDT

In most of my JSP's I am using c:forEach to get object from list and I am binding that object using Spring:bind. But in most JSP's it is giving the following exception.

java.lang.ClassCastException: org.apache.taglibs.standard.lang.jstl.ImplicitObjects
        at javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects.getImplicitObjects(ImplicitObjectELResolver.java:608)
        at javax.servlet.jsp.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:169)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
        at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
        at org.apache.jasper.runtime.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:137)
        at org.springframework.web.util.ExpressionEvaluationUtils$Jsp20ExpressionEvaluationHelper.evaluate(ExpressionEvaluationUtils.java:404)
        at org.springframework.web.util.ExpressionEvaluationUtils.doEvaluate(ExpressionEvaluationUtils.java:276)
        at org.springframework.web.util.ExpressionEvaluationUtils.evaluateString(ExpressionEvaluationUtils.java:192)
        at org.springframework.web.servlet.tags.BindTag.doStartTagInternal(BindTag.java:105)
        at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)
        at org.apache.jsp.WEB_002dINF.jsp.underwriting.applicantCredit_jsp._jspService(applicantCredit_jsp.java:633)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
        at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:167)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1158)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)


I am using the following type of code in most of my JSP's :

<table align="left" class=labeloptional>
                                                      <c:forEach var="conditionList" items="${decisionTO.conditionList}" varStatus="loopStatus">
                                               <c:set var="count" value="${loopStatus.index + 1 }"/>
                                       <tr>
                                           <td nowrap><fmt:message key="label.decisionTO.Condition"/></td><%--<c:out value="${count}"/>--%>
                                                <td>
                                                        <c:set var="conditionPath" value="decisionTO.conditionList[${loopStatus.index}].conditionName"/>
                                                        <spring:bind path="${conditionPath}">
                                                        <textarea type=text id="<c:out value="${count}"/>" name="<c:out value="${status.expression}"/>" readOnly cols=20 rows=1 class=textbox><c:out value="${status.value}"/></textarea>
                                                        </spring:bind>
                                                        
                                                        <c:set var="conditionIdPath" value="decisionTO.conditionList[${loopStatus.index}].conditionId"/>
                                                         <spring:bind path="${conditionIdPath}">
                                                        <input type="hidden" id="hidden<c:out value="${count}"/>" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>" class=textbox />
                                                        </spring:bind>
                                                        <c:if test="${loopStatus.index eq '0'}">
                                                        <INPUT TYPE=button NAME='ButtonCondition' VALUE="<fmt:message key="label.decisionTO.button.conditionList"/>" onclick="window.open('conditionList.htm','SelectCondition','WIDTH=420,HEIGHT=300, resizable=yes,top=50,left=100,scrollbars=yes')">
                                                </c:if>
                                                </td>
                                </tr>
                            </c:forEach>
                                </table>
[Message sent by forum member 'sameenulla' (sameenulla)]

http://forums.java.net/jive/thread.jspa?messageID=349091