Meaningless Drivel is fun!
The moose likes Struts and the fly likes Sending variables problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Sending variables problem" Watch "Sending variables problem" New topic

Sending variables problem

Andrei Antonescu
Ranch Hand

Joined: Jul 08, 2010
Posts: 75

I am havin a textfield with the value 0.0. In my action i have a X variable of type Float. When the textfield is non-zero, the conversion is made correctly and the X variable is initialised in the action. When it is 0 it gives an exception because it is searching for a setter of type String (for the variable X I only have one of type Float).
I have tried to create a setX(String y) method but the result is the same.

Can you please help?
Thanks in advance
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

This appears to be a known issue with Struts. Is it possible for you to use a different type for this variable?
I agree. Here's the link:
subject: Sending variables problem
It's not a secret anymore!