This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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: 63542

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: struts tag
It's not a secret anymore!