Advertisement

05.24.2007 at 10:06PM PDT, ID: 22594226
[x]
Attachment Details

Struts Beginner question - validation (enter string into field for double)

Asked by InNoCenT_Ch1ld in Jakarta Struts

Tags: struts, double, actionform, enter, validation

how to capture input type problem in validation?
in my ActionForm, i have this property 'cost' which i declared as double, and its getter and setter method as below:

public void setCost(double d){cost = d;}
public double getCost(){return cost;}

so how do i capture this type mismatch error in my validation? I want it to be able to go back to the input jsp and display an error msg.

please let me know if my question is not clear.Start Free Trial
[+][-]05.24.2007 at 10:37PM PDT, ID: 19154859

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.24.2007 at 10:39PM PDT, ID: 19154866

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Jakarta Struts
Tags: struts, double, actionform, enter, validation
Sign Up Now!
Solution Provided By: Jathrek
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.24.2007 at 10:52PM PDT, ID: 19154909

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32