RE: Validate method going in infinite Loop

2003-07-10 Thread Nagendra Kumar O V S





  
  

   
   
  hi,
  well then..
  do not perform any validations in the validate method. (leave it 
  empty).
  do this email validation in the action class. so if ur email is 
  invalid add that to errors and also get other data from db and then 
  forward to jsp.
  so this will display both ur error and other db data
   
  make sure u create the errors object as usual and u shoud save those 
  errors to the request object using
  saveErrors(errors,request)
   
  --nagi
   
   
  ---Original Message---
   
  
  From: Pankaj Borgaonkar
  Date: Thursday, July 
  10, 2003 12:45:24 PM
  To: Struts Users Mailing 
  List; Nagendra Kumar O V 
  S
  Subject: RE: Validate 
  method going in infinite Loop
   
  Thanks Nagendra
   
  But on the 
  JSP page I want to show both the errors as well as the data ( 
  form bean variable which are populated in the performAction() method of 
  action class. )
  i.e. in 
  validate method if email address is invalid then I am adding the errors 
  and forwarding to JSP page, this page will show the errors only but not 
  the formbean values 
  as it has not 
  gone into the performAction(). So I need to show the errors also and the 
  data also from database. This data is not used for validating the email 
  address but it is used for showing some  suggested email 
  addresses.
   
  Please reply 
  
  Pankaj 
  
   
  

-Original Message-From: Nagendra 
Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Thursday, July 
10, 2003 12:43 PMTo: 
[EMAIL PROTECTED]Subject: Re: Validate method 
going in infinite Loop

  
  

  hi pankaj,
   
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo"> 
  path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/> 
  ** this action mapping goes into a infinite loop , becos, if 
  u find an error ur calling emailcreation.mo(input parameter). that 
  is it is calling itself. and hence infinte loop. everytime u call 
  emailcreation.mo , validate method will be called.
   
   
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp">path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>** 
  this seems to be ok , becos ur forwarding the controll to 
  /jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input 
  parameter) and the jsp page should display ur error. and if u want 
  to get data from db(for validation) , get it from validate method 
  only. ur control will never go action class unless all the 
  validations are success..
   
  --nagi
   
   
  ---Original 
  Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Thursday, 
  July 10, 2003 12:11:05 PM
  To: [EMAIL PROTECTED]
  Subject: 
  Validate method going in infinite Loop
   Hi All,I am validating email address 
  entered by user, using in validate methodof formBean. If the 
  email address is invalid I am adding the errors. Struts 
  Config entries:type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp">path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>ORtype="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo"> 
  path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>Second 
  one is going into the loop and first one is not getting 
  thevalues from database as the request is goin

RE: Validate method going in infinite Loop

2003-07-10 Thread Pankaj Borgaonkar

Thanks Nagendra
 
But on the JSP page I want to show both the errors as well as the data (
form bean variable which are populated in the performAction() method of
action class. )
i.e. in validate method if email address is invalid then I am adding the
errors and forwarding to JSP page, this page will show the errors only
but not the formbean values 
as it has not gone into the performAction(). So I need to show the
errors also and the data also from database. This data is not used for
validating the email address but it is used for showing some  suggested
email addresses.
 
Please reply 
Pankaj 
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 10, 2003 12:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Validate method going in infinite Loop



hi pankaj,
 
 


 
** this action mapping goes into a infinite loop , becos, if u find an
error ur calling emailcreation.mo(input parameter). that is it is
calling itself. and hence infinte loop. everytime u call
emailcreation.mo , validate method will be called.
 
 





** this seems to be ok , becos ur forwarding the controll to
/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input
parameter) and the jsp page should display ur error. and if u want to
get data from db(for validation) , get it from validate method only. ur
control will never go action class unless all the validations are
success..
 
--nagi
 
 
---Original Message---
 
From: Struts Users Mailing  <mailto:[EMAIL PROTECTED]> List
Date: Thursday, July 10, 2003 12:11:05 PM
To: [EMAIL PROTECTED]
Subject: Validate method going in infinite Loop
 
Hi All,

I am validating email address entered by user, using in validate method
of formBean. If the email address is invalid I am adding the errors. 

Struts Config entries:






OR

 



Second one is going into the loop and first one is not getting the
values from database as the request is going to JSP not to action class
i.e the formbean values are not populate.

How can I overcome this problem.

Thanks in Advance 

Regards
Pankaj Borgaonkar
Wipro Technologies


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited
is 
'privileged' and 'confidential' and intended for use only by the
individual
or entity to which it is addressed. You are notified that any use,
copying 
or dissemination of the information contained in the E-MAIL in any
manner 
whatsoever is strictly prohibited.


***





 <http://www.incredimail.com/redir.asp?ad_id=309&lang=9>   IncrediMail -
Email has finally evolved -
<http://www.incredimail.com/redir.asp?ad_id=309&lang=9> Click Here 


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


Re: Validate method going in infinite Loop

2003-07-10 Thread Nagendra Kumar O V S








  hi pankaj,
   
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo"> 
  path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/> 
  ** this action mapping goes into a infinite loop , becos, if u find 
  an error ur calling emailcreation.mo(input parameter). that is it is 
  calling itself. and hence infinte loop. everytime u call emailcreation.mo 
  , validate method will be called.
   
   
  type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp">path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>** 
  this seems to be ok , becos ur forwarding the controll to 
  /jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp(input 
  parameter) and the jsp page should display ur error. and if u want to get 
  data from db(for validation) , get it from validate method only. ur 
  control will never go action class unless all the validations are 
  success..
   
  --nagi
   
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Thursday, July 
  10, 2003 12:11:05 PM
  To: [EMAIL PROTECTED]
  Subject: Validate 
  method going in infinite Loop
   Hi All,I am validating email address entered by 
  user, using in validate methodof formBean. If the email address is 
  invalid I am adding the errors. Struts Config 
  entries:type="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp">path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>ORtype="com.onstar.myonstar.process.web.controller.EmailCreationAction" 
  name="emailCreationForm" 
  validate="true"scope="request"input="/emailcreation.mo"> 
  path="/jsp/virtualadvisor/emailcreation/va_pr_emailsetup_main.jsp"redirect="false"/>Second 
  one is going into the loop and first one is not getting thevalues from 
  database as the request is going to JSP not to action classi.e the 
  formbean values are not populate.How can I overcome this 
  problem.Thanks in Advance RegardsPankaj 
  BorgaonkarWipro 
  Technologies**DisclaimerInformation 
  contained in this E-MAIL being proprietary to Wipro Limited is 
  'privileged' and 'confidential' and intended for use only by the 
  individualor entity to which it is addressed. You are notified that 
  any use, copying or dissemination of the information contained in the 
  E-MAIL in any manner whatsoever is strictly 
  prohibited.***





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here