This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Struts and the fly likes <s:bean> usage Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "<s:bean> usage" Watch "<s:bean> usage" New topic
Author

<s:bean> usage

Vidya Lakshman
Greenhorn

Joined: Apr 09, 2008
Posts: 10
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

Joined: Oct 29, 2001
Posts: 8291

Does demo.MyBean have a method setMyDate()? What do you expect should happen with this code?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Vidya Lakshman
Greenhorn

Joined: Apr 09, 2008
Posts: 10
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

Joined: Oct 29, 2001
Posts: 8291

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: <s:bean> usage
 
Similar Threads
exception java.sql.SQLException: Exhausted Resultset
Struts2---Problem to use s:iterator and s:date to display and pass value
JSP date field
Date and Month validation in JSP
exception java.sql.SQLException: Exhausted Resultset