• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with bean:write tag

 
Nikhil Bansal
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic