wood burning stoves*
The moose likes Struts and the fly likes Problem with bean:write 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 » Frameworks » Struts
Bookmark "Problem with bean:write tag" Watch "Problem with bean:write tag" New topic
Author

Problem with bean:write tag

Nikhil Bansal
Ranch Hand

Joined: Jan 24, 2005
Posts: 60
Hi All,

I'm new to Struts.

I am writing a simple application wherein I am fetching data from database based on a parameter and displaying it to JSP.

For the display purpose I am <bean:write> tag but it is not working.

The code is as follows :

<tr><td><bean:write name="ContractForm" property = "contractNumber" scope="session"></td></tr>

where ContractForm is my form bean.I have given it's definition in struts-config.xml

The property contractNumber is defined as get and set methods in the Form bean.

However when I use the JSP expression <%=contractForm.getContractNumber()%> it works fine.

What am I missing.

Please help

Regards

Nikhil Bansal


ban$al
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I suspect this may be a simple spelling error. Make sure the Action-form definition in your struts-config.xml file exactly matches the name attribute of your <bean:write> tag. Struts is case-sensitive.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with bean:write tag
 
Similar Threads
bean:write tag - query
getting errors
validation of indexed properties
javax.servlet.ServletException:javax.servlet.jsp.JspException: Cannot find bean: "riga" in any scope
Struts Logic Tag problem