2016年10月14日

数据校验

摘要: 1、用execute()方法实现数据校验 继承自ActionSupport类,重写execute() 2、用validate()方法实现数据校验 继承ActionSupport类,该类实现了Validateable接口,该接口中定义了一个validate()方法,在自定义的Action类中重写val 阅读全文

posted @ 2016-10-14 14:18 -EASY- 阅读(1435) 评论(0) 推荐(0) 编辑

struts2国际化

摘要: 国际化需要在原来的基础上添加需要的资源文件,现在要实现 中文和英文之间的转换为例 首先创建出两个资源文件,分别是message.properties 和message_cn.properties message_cn.properties 如下:(英文) register.page=HouserRe 阅读全文

posted @ 2016-10-14 14:14 -EASY- 阅读(118) 评论(0) 推荐(0) 编辑

原生态 ajax

摘要: 用户名是否被注册过? 创建出注册信息: <h1>注册信息</h1><input type="text" name="txtName" id="txtName"/> <span id="msg"></span><br/><input type="password" name="txtPwd"/> // 阅读全文

posted @ 2016-10-14 14:14 -EASY- 阅读(183) 评论(0) 推荐(0) 编辑

导航