This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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?
Have you checked out Aspose?
subject: Sending variables problem
It's not a secret anymore!