/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.jackey.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;
import org.apache.struts.action.ActionMessage;
//import java.io.Serializable;
/**
* MyEclipse Struts
* Creation date: 04-20-2008
*
* XDoclet definition:
* @struts.form name="tstForm"
*/
public class TstForm extends ActionForm {
/*
* Generated fields
*/
/** v1 property */
private String v1;
/** v2 property */
private String v2;
private String result;
/*
* Generated Methods
*/
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
if(v1==null || v1.length()<1)
{
// ActionMessage errors=new ActionMessage();
errors.add("v1",new ActionMessage("null.error"));
}
// System.out.println("Username = " + v1 + " " + "Password = "+ v2 );
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* Returns the v1.
* @return String
*/
public String getV1() {
return v1;
}
/**
* Set the v1.
* @param v1 The v1 to set
*/
public void setV1(String v1) {
this.v1 = v1;
}
/**
* Returns the v2.
* @return String
*/
public String getV2() {
return v2;
}
/**
* Set the v2.
* @param v2 The v2 to set
*/
public void setV2(String v2) {
this.v2 = v2;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
struts form action验证
共17个文件
jsp:3个
class:2个
xml:2个
需积分: 3 11 下载量 195 浏览量
2008-05-19
21:42:23
上传
评论
收藏 9KB RAR 举报
温馨提示
J2EE Struts Form验证与Action验证(简单计算器)
资源推荐
资源详情
资源评论
收起资源包目录
test.rar (17个子文件)
test
.project 1KB
.mymetadata 285B
WebRoot
WEB-INF
.struts-config.mex 1KB
web.xml 1KB
struts-config.xml 805B
lib
classes
com
jackey
struts
action
TstAction.class 2KB
form
TstForm.class 2KB
ApplicationResources.properties 140B
index.jsp 834B
META-INF
MANIFEST.MF 39B
result.jsp 960B
tst.jsp 509B
.myeclipse
src
com
jackey
struts
action
TstAction.java 2KB
form
TstForm.java 2KB
ApplicationResources.properties 140B
.mystrutsdata 257B
.classpath 453B
共 17 条
- 1
资源评论
jackey0517
- 粉丝: 11
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功