首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > Ruby Rails >

struts ActionErrors有关问题:ActionError cannot be resolved or is not

2012-12-19 
struts ActionErrors问题:ActionErrorcannotberesolvedorisnot点击右边红色标题查看本文完整版:struts Act

struts ActionErrors问题:ActionError cannot be resolved or is not
点击右边红色标题查看本文完整版:struts ActionErrors问题:ActionError cannot be resolved or is not a type

// 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。     

热点排行