struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: ClassCastException cannot be cast to java.lang.String
Date Tue, 24 Mar 2009 16:19:35 GMT
2009/3/24 foward <>:
> the method getForm() return a object Form where before with the respective
> id is obtained and returned.

You put method getForm() in s:form as a action, which means such
method will be called by Struts 2 and the framework will expect a
String - result name, which you have to define in struts.xml.
You shouldn't return an object like Form. To do that, implement
ModelDriven interface and return your Form object from method
getModel() and in your jsp use ${name} instead ${}

> Yes I m reading a book struts in action, I don't know if you recomend me a
> good one.

That is good one


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message