This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes struts tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "struts tag" Watch "struts tag" New topic

struts tag

Mauro Marra

Joined: Nov 15, 2005
Posts: 2

I'm trying to reference the property of a nested bean in a struts html:file tag.
Here is my code :<c:forEach items="${}" var="service" varStatus="servStatus">
<c:forEach items="${service.documents}" var="document" varStatus="docStatus">
<html:file name="document" property="theFile" size="30"/>
<html:text name="document" property="docCode" size="30"/>

While the tag html:text works fine, the html:file gives me the following error:
"javax.servlet.ServletException: No getter method for property theFile of bean document"
Anyway my bean document has got getter and setter methods for the property

Can you help please
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60804

The Struts tag is probably expecting document to be a scripting variable rather than a scoped variable. The JSTL/EL does not create scripting variables.

In future posts, please be sure to enclose any posted code in UBB code tags. (See the CODE button on the entry page).

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Consider Paul's rocket mass heater.
subject: struts tag
Similar Threads
which jar file need to strug.taglib
struts el + html:text-el question
Indexed property
can't get indexed form property to work.
html:img NullPointerException