struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wu qihua" <>
Subject when the validate retrun null,then the excute in action will not call?
Date Thu, 29 Aug 2002 09:16:28 GMT
    when the field is wqh ,there isn't any  message print in the console,but 
if the field is "wqh",then it will print
         begin to process
         not equal

and if the excute run ,print the sentence "begin to process" is a must,but 
really it did not,that means the function of excute never run when validate 
return null,
if I want it to run ,and do not add any error message,what should it return?

public ActionErrors validate(
		ActionMapping mapping,
		HttpServletRequest request) {
		if (nam.equals("wqh")){
			ActionErrors err=new ActionErrors();
			err.add("error",new ActionError("first"));
			return err;
		return null;

public ActionForward execute(..)
		throws Exception {
		LongonForm longonForm = (LongonForm) form;
  ///////////*********  this print sentence must run if the excute is called 
		System.out.println(" begin to process";
		if (longonForm.getNam().equals("wqh")){
			System.out.println("equal to wqh");
     		throw new UnsupportedOperationException("Easy Struts : i);
     	else {
           System.out.println("not equal");
     	   return (mapping.getInputForward());

Chat with friends online, try MSN Messenger:

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

View raw message