You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vijaya S <sv...@solutionscraft.com> on 2005/09/28 14:41:16 UTC

JSTL Error

Hello,

I am struggling with the JSTL error for the past two days. Can someone help
me in this?

In my JSP, I have the following code to populate bean array properties.

<c:forEach var="vsr" items="${vsroute}">
    <c:catch var="coercionError">
       <tr>
            <td><c:out value="${vsr.fromcity}" /></td>
            <td><c:out value="${vsr.tocity}" /></td>
            <td><c:out value="${vsr.dbcities}" /></td>
            <td><c:out value="${vsr.duom}" /></td>
        </tr>
    </c:catch>
    <c:if test="${not empty coercionError}">
        <tr><td>Route Disp Err :</td>
              <td><br><font color="#FF0000"><c:out
value="${coercionError}"/></font></td>
        </tr>
    </c:if>
 </c:forEach>

The bean 'vsroute' is correctly built from the action.

I get the following error from the JSP
javax.servlet.jsp.JspException: An error occurred while evaluating custom
action attribute "value" with value "${vsr.fromcity}": Unable to find a
value for "fromcity" in object of class "DBObjs.subscriber.vo.VSRouteVO"
using operator "." (null)

I did a google search on this and there was a suggestion that the older jsp
may be cached in tomcat work folder and I did remove that. Even then I get
this error.

I have around four rows in the bean array and I get four times the above
error as I am catching the error within the forEach loop.

Thanks in advance for the help.

Vijaya



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] JSTL Error

Posted by Rahul Akolkar <ra...@gmail.com>.
Marked OT, since taglibs-user@jakarta.apache.org [
http://jakarta.apache.org/taglibs/index.html#MailingLists ] might be a
more appropriate forum for purely JSTL related questions.

On 9/28/05, Vijaya S <sv...@solutionscraft.com> wrote:
<snip/>
> I get the following error from the JSP
> javax.servlet.jsp.JspException: An error occurred while evaluating custom
> action attribute "value" with value "${vsr.fromcity}": Unable to find a
> value for "fromcity" in object of class "DBObjs.subscriber.vo.VSRouteVO"
> using operator "." (null)
<snap/>

Usually associated with not having an accessible getter for the
property (in this case, "fromcity").

-Rahul

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSTL Error

Posted by Rick Reumann <st...@reumann.net>.
Yahzz Yan wrote the following on 9/28/2005 2:17 PM:

> Route Disp Err :
> 
> value="${coercionError}"/>

Not sure what the above has to do with the below, but ....

> I get the following error from the JSP
> javax.servlet.jsp.JspException: An error occurred while evaluating custom
> action attribute "value" with value "${vsr.fromcity}": Unable to find a
> value for "fromcity" in object of class "DBObjs.subscriber.vo.VSRouteVO"
> using operator "." (null)

I think you get that when your object is null (check to see if VSRouteVO 
is null in the JSP at that point. Do ...

<c:if test='${empty vsr}'>  Ooops we have a problem </c:if>

Also are you sure you have a getFromcity() method in VSRouteVO (spelled 
exactly like getFromcity()?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: JSTL Error

Posted by Yahzz Yan <ya...@yahoo.com>.
What are the scope the variables used in that object?

Vijaya S <sv...@solutionscraft.com> wrote:Hello,

I am struggling with the JSTL error for the past two days. Can someone help
me in this?

In my JSP, I have the following code to populate bean array properties.











Route Disp Err :

value="${coercionError}"/>




The bean 'vsroute' is correctly built from the action.

I get the following error from the JSP
javax.servlet.jsp.JspException: An error occurred while evaluating custom
action attribute "value" with value "${vsr.fromcity}": Unable to find a
value for "fromcity" in object of class "DBObjs.subscriber.vo.VSRouteVO"
using operator "." (null)

I did a google search on this and there was a suggestion that the older jsp
may be cached in tomcat work folder and I did remove that. Even then I get
this error.

I have around four rows in the bean array and I get four times the above
error as I am catching the error within the forEach loop.

Thanks in advance for the help.

Vijaya



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.