Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<s:bean> usage

 
Vidya Lakshman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting Caught OgnlException while setting property 'myDate' on type 'demo.MyBean'.
java.lang.NoSuchMethodException: setMyDate(java.lang.String)
in the below mentioned code. please help.

Code in Action Class


code in JSP
body>
</html>[/code]

 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does demo.MyBean have a method setMyDate()? What do you expect should happen with this code?
 
Vidya Lakshman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the code in MyBean.


BeanInput.jsp has a textbox wherein, I would enter the date & Iould want to print the dates in different format in BeanTag.jsp.
 
Joe Ess
Bartender
Posts: 9298
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can see in the error that OGNL is expecting MyBean.setMyDate() to take a String argument.
It sounds like this is not an uncommon problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic