users
[Top] [All Lists]

RE: [cinjug-users] newbie trying to learn m-v-c

To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] newbie trying to learn m-v-c
From: sdgesa gaeharth <pollux1234567890@xxxxxxxxx>
Date: Wed, 8 Sep 2004 08:49:30 -0700 (PDT)
Delivered-to: mailing list users@cinjug.org
In-reply-to: <7266759DD1C5D6428963975E00FA084309AAD5@csg-ml02.cardinalsolutions.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thanks for the reply.I tried your code and i got an
error saying "cannot resolve symbol(get), so i changd
it to:request.getParameter. Now I get this error
message when trying your code:

inconvertible types
found   : java.lang.String
required: com.bdi.www.members.MemberValidateForm
 MemberValidateForm formToValidate =
(MemberValidateForm)request.getParameter("formToValidate");

thanks again




--- Ted Tollefson <ttollefson@xxxxxxxxxxxxxxxxxxxxx>
wrote:

> In your JSP, you can call this:
>  
> <%
>  
>  MemberValidateForm formToValidate =
> (MemberValidateForm) request.get("formToValidate");
> 
>
out.println(formToValidate.getErrorMsg("firstName"));
>  
> %> 
> 
> 
> ________________________________
> 
> From: sdgesa gaeharth
> [mailto:pollux1234567890@xxxxxxxxx]
> Sent: Tue 9/7/2004 7:43 PM
> To: users@xxxxxxxxxx
> Subject: [cinjug-users] newbie trying to learn m-v-c
> 
> 
> 
> hello,
> 
> as you can see i have a simple app here. How can i
> get
> the error msgs and form values to show up when the
> servlet detects a form validation error?
> 
> I can do a System.out.println in MemberSerlvet.java
> (below) and see the proper error message. But i cant
> get it passed to the jsp page properly.
> 
> please help!
> 
> 
> MemberValidateForm formToValidate = new
> MemberValidateForm();
>                 allOk =
>
formToValidate.validate(firstName,lastName,emailAddress,homePhone);
>
System.out.println(formToValidate.getErrorMsg("firstName");
>                 if(allOk){
>                         toPage = "/MemberAdd";
>                 }
>                
> req.setAttribute("formToValidate",formToValidate);
> 
> 
>                
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail 
> 
> 

> ATTACHMENT part 2 application/ms-tnef
name=winmail.dat
> ---------
> You may unsubscribe from this mailing list
> by sending a blank email addressed to:
> users-unsubscribe@xxxxxxxxxx
> 
> --
> Find additional help by sending a blank email
> addressed to:
> users-help@xxxxxxxxxx



                
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

<Prev in Thread] Current Thread [Next in Thread>