专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Java Exception

struts ActionErrors问题:ActionError cannot be resolved or is not a type

发布时间:2010-06-05 12:33:46 文章来源:www.iduyao.cn 采编人员:星星草

// Created by Xslt generator for Eclipse.
  // XSL : not found (java.io.FileNotFoundException: (系统找不到指定的路径。))
  // Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xsl
 
  package com.youcompany.struts.form;
 
  import javax.servlet.http.HttpServletRequest;
 
  import org.apache.struts.action.ActionErrors;
  import org.apache.struts.action.ActionForm;
  import org.apache.struts.action.ActionMapping;
 
  public class OwnerForm extends ActionForm {
 
  // --------------------------------------------------------- Instance Variables
  private String email;
  private String greet = "Mr.";
  private String address;
  private int tel = 0;
  private String name;
 
 
  private String Email;
  private String Greet = "Mr.";
 
  private String Address;
 
  private int Tel = 0;
 
  private String Name;
 
  public ActionErrors validate(
  ActionMapping mapping,
  HttpServletRequest request) {
 
  ActionErrors errors = new ActionErrors();
  if (name == null || name.trim().equals("")) {
  errors.add("name", new ActionError("error.name"));
  }
 
 
  throw new UnsupportedOperationException("Generated method 'validate(...)' not implemented.");
  }
 
  public void reset(ActionMapping mapping, HttpServletRequest request) {
  Email = "";
  Greet = "Mr.";
  Address = "";
  Tel = 0;
  Name = "";
 
  }
 
  public String getEmail() {
  return Email;
  }
 
  public void setEmail(String Email) {
  this.Email = Email;
  }
 
  public String getGreet() {
  return Greet;
  }
 
 
  public void setGreet(String Greet) {
  this.Greet = Greet;
  }
 
 
  public String getAddress() {
  return Address;
  }
 
 
  public void setAddress(String Address) {
  this.Address = Address;
  }
 
  public int getTel() {
  return Tel;
  }
 
  public void setTel(int Tel) {
  this.Tel = Tel;
  }
 
  public String getName() {
  return Name;
  }
 
  public void setName(String Name) {
  this.Name = Name;
  }
 
  }
 
  errors.add("name", new ActionError("error.name"));出错,提示ActionError cannot be resolved or is not a type。     

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: