/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.myssh.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import com.myssh.form.UserForm;
import com.myssh.po.User;
import com.myssh.service.IUserService;
/**
* MyEclipse Struts
* Creation date: 09-05-2008
*
* XDoclet definition:
* @struts.action path="/user" name="userForm" parameter="status" scope="request"
*/
public class UserAction extends DispatchAction {
private IUserService iuserservice;
public ActionForward insert(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
UserForm userForm = (UserForm) form;
User user = new User();
user.setUsername(userForm.getUsername());
user.setPassword(userForm.getPassword());
boolean b = iuserservice.insert(user);
if(b){
return mapping.findForward("success");
}else{
return mapping.findForward("fail");
}
}
public IUserService getIuserservice() {
return iuserservice;
}
public void setIuserservice(IUserService iuserservice) {
this.iuserservice = iuserservice;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论














收起资源包目录












































































共 44 条
- 1
资源评论

raykcn
- 粉丝: 2
- 资源: 2

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
