⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginaction.java

📁 webwork入门的例子
💻 JAVA
字号:
package com.lyx.web.action;

import com.lyx.bo.User;
import com.lyx.service.IUserService;
import com.opensymphony.xwork.Action;
import com.opensymphony.xwork.ActionSupport;
import com.opensymphony.xwork.ModelDriven;


@SuppressWarnings("serial")
public class LoginAction extends ActionSupport implements Action,ModelDriven {
//注意这里的User一定要初始化
	private User user=new User();
	private IUserService userService;
	public User getUser() {
		return user;
	}
	public String execute() throws Exception {
		if (userService.isValidUser(user))
			return this.SUCCESS;
		else
			return this.ERROR;
	}
	public Object getModel() {
		return user;
	}

	public void setUserService(IUserService userService) {
		this.userService = userService;

	}


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -