RE: Question about adding ActionErrors

2002-12-09 Thread shirishchandra . sakhare
that makes sense...May be u are right..

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:54 AM
To: struts-user
Subject: RE: Question about adding ActionErrors


I thought it was normally request scope?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 17:44
To: [EMAIL PROTECTED]
Subject: RE: Question about adding ActionErrors


I think the errors are saved in session not in form.

-Original Message-
From: MohanR [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:27 AM
To: struts-user
Cc: MohanR
Subject: RE: Question about adding ActionErrors


Hi,
We are validating against the database in the LoginAction through a
business delegate. I think the validation in the form would be limited to
checking for null or spaces...

A related question.

In my action, I use saveErrors. How are the 'errors' saved inside the
form ?

Thanks,
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 08, 2002 1:24 AM
To: Struts Users Mailing List
Subject: Question about adding ActionErrors


Hi,

i have a LoginForm ( ValidatorForm ), which will validate if username and
password is entered. Ok, but after this i have to probe if the entered
username/password combination really exists in the database.

My question is where to perform the database-check ... in the LoginForm by
overriding the validate method or in the requested Action ( /Login.do ) ?

It seems to me a litte bit confusing that a ValidatorForm should make a
database-connect instead of the Action.

Any help would be appreciated.

Jan Zimmek



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Question about adding ActionErrors

2002-12-09 Thread Andrew Hill
I thought it was normally request scope?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 17:44
To: [EMAIL PROTECTED]
Subject: RE: Question about adding ActionErrors


I think the errors are saved in session not in form.

-Original Message-
From: MohanR [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:27 AM
To: struts-user
Cc: MohanR
Subject: RE: Question about adding ActionErrors


Hi,
We are validating against the database in the LoginAction through a
business delegate. I think the validation in the form would be limited to
checking for null or spaces...

A related question.

In my action, I use saveErrors. How are the 'errors' saved inside the
form ?

Thanks,
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 08, 2002 1:24 AM
To: Struts Users Mailing List
Subject: Question about adding ActionErrors


Hi,

i have a LoginForm ( ValidatorForm ), which will validate if username and
password is entered. Ok, but after this i have to probe if the entered
username/password combination really exists in the database.

My question is where to perform the database-check ... in the LoginForm by
overriding the validate method or in the requested Action ( /Login.do ) ?

It seems to me a litte bit confusing that a ValidatorForm should make a
database-connect instead of the Action.

Any help would be appreciated.

Jan Zimmek



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Question about adding ActionErrors

2002-12-09 Thread shirishchandra . sakhare
I think the errors are saved in session not in form.

-Original Message-
From: MohanR [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:27 AM
To: struts-user
Cc: MohanR
Subject: RE: Question about adding ActionErrors


Hi,
We are validating against the database in the LoginAction through a
business delegate. I think the validation in the form would be limited to
checking for null or spaces...

A related question.

In my action, I use saveErrors. How are the 'errors' saved inside the
form ?

Thanks,
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 08, 2002 1:24 AM
To: Struts Users Mailing List
Subject: Question about adding ActionErrors


Hi,

i have a LoginForm ( ValidatorForm ), which will validate if username and
password is entered. Ok, but after this i have to probe if the entered
username/password combination really exists in the database.

My question is where to perform the database-check ... in the LoginForm by
overriding the validate method or in the requested Action ( /Login.do ) ?

It seems to me a litte bit confusing that a ValidatorForm should make a
database-connect instead of the Action.

Any help would be appreciated.

Jan Zimmek



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Question about adding ActionErrors

2002-12-08 Thread Mohan Radhakrishnan
Hi,
We are validating against the database in the LoginAction through a
business delegate. I think the validation in the form would be limited to
checking for null or spaces...

A related question.

In my action, I use saveErrors. How are the 'errors' saved inside the
form ?

Thanks,
Mohan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 08, 2002 1:24 AM
To: Struts Users Mailing List
Subject: Question about adding ActionErrors


Hi,

i have a LoginForm ( ValidatorForm ), which will validate if username and
password is entered. Ok, but after this i have to probe if the entered
username/password combination really exists in the database.

My question is where to perform the database-check ... in the LoginForm by
overriding the validate method or in the requested Action ( /Login.do ) ?

It seems to me a litte bit confusing that a ValidatorForm should make a
database-connect instead of the Action.

Any help would be appreciated.

Jan Zimmek



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




Re: Question about adding ActionErrors

2002-12-07 Thread David Graham
Neither your forms or actions should ever make a db connection.  That should 
happen in the DAO layer.  Let the validator check that the username and 
password are filled in and the minimum number of characters then let it call 
your login action.  Your login action with call a business method like:
User user = userService.login(loginForm.getUsername(), 
loginForm.getPassword());

If user is null then the login failed and you do
// add any error messages here

return mapping.findForward("failure");

else, it worked and you forward to the success page.

David






From: <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Question about adding ActionErrors
Date: Sat, 7 Dec 2002 20:53:58 +0100

Hi,

i have a LoginForm ( ValidatorForm ), which will validate if username and 
password is entered. Ok, but after this i have to probe if the entered 
username/password combination really exists in the database.

My question is where to perform the database-check ... in the LoginForm by 
overriding the validate method or in the requested Action ( /Login.do ) ?

It seems to me a litte bit confusing that a ValidatorForm should make a 
database-connect instead of the Action.

Any help would be appreciated.

Jan Zimmek




_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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