You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Helen Ge <hg...@mamsi.com> on 2003/07/16 16:50:00 UTC

Can't find struts DynaActionForm property with JSTL

Hi,
 
I am using Struts DynaActionForm object dataForm (session scope) to hold a
form data. It is no problem to display that form bean property in the JSP
page by using the Struts bean tag <bean:write name="dataForm"
property="check_id"  />.
 
However I'd like see how the JSTL works by using JSTL without specifying
scope <c:out value="${dataForm.check_id}"  />, it gave me exception like
this:
javax.servlet.ServletException: An error occurred while evaluating custom
action attribute "value" with value "${dataForm.check_id}": Unable to find a
value for "check_id" in object of class
"org.apache.struts.action.DynaActionForm" using operator "." (null)
 
If I specify the sessionScope as <c:out
value="${sessionScope.dataForm.check_id}"  />, then there is no exception
thrown, but no value returned from check_id property.
 
I am using Tomcat 4.04, I have JSTL 1.0 installed. 
Can someone help me out ?
 
Thanks
 
 
 


Notice of Confidentiality:  The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee.  Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited.  If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it. 


Re: Can't find struts DynaActionForm property with JSTL

Posted by Sgarlata Matt <sg...@bah.com>.
Your syntax for <c:out> is correct using ActionForms, but for
DynaActionForms you need to do this:

<c:out value="${dataForm.map.check_id}"  />

Matt
----- Original Message -----
From: "Helen Ge" <hg...@mamsi.com>
To: <ta...@jakarta.apache.org>
Sent: Wednesday, July 16, 2003 10:50 AM
Subject: Can't find struts DynaActionForm property with JSTL <c:out >


> Hi,
>
> I am using Struts DynaActionForm object dataForm (session scope) to hold a
> form data. It is no problem to display that form bean property in the JSP
> page by using the Struts bean tag <bean:write name="dataForm"
> property="check_id"  />.
>
> However I'd like see how the JSTL works by using JSTL without specifying
> scope <c:out value="${dataForm.check_id}"  />, it gave me exception like
> this:
> javax.servlet.ServletException: An error occurred while evaluating custom
> action attribute "value" with value "${dataForm.check_id}": Unable to find
a
> value for "check_id" in object of class
> "org.apache.struts.action.DynaActionForm" using operator "." (null)
>
> If I specify the sessionScope as <c:out
> value="${sessionScope.dataForm.check_id}"  />, then there is no exception
> thrown, but no value returned from check_id property.
>
> I am using Tomcat 4.04, I have JSTL 1.0 installed.
> Can someone help me out ?
>
> Thanks
>
>
>
>
>
> Notice of Confidentiality:  The information included and/or attached in
this
> electronic mail transmission may contain confidential or privileged
> information and is intended for the addressee.  Any unauthorized
disclosure,
> reproduction, distribution or the taking of action in reliance on the
> contents of the information is prohibited.  If you believe that you have
> received the message in error, please notify the sender by reply
> transmission and delete the message without copying or disclosing it.
>
>


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