This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "struts tag" Watch "struts tag" New topic
Author

struts tag

Mauro Marra
Greenhorn

Joined: Nov 15, 2005
Posts: 2
Hi,

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

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
Marshal

Joined: Jan 10, 2002
Posts: 63349
    
  70

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts tag
 
It's not a secret anymore!