日期:2014-05-17 浏览次数:20685 次
package com.news.app.user; import java.sql.SQLException; import com.sun.dao.FirstTypeDAOImpl; import sun.common.SunActionSupport; public class UserAction extends SunActionSupport{ private UserService userService; private FirstTypeDAOImpl firsttypeDAO; public FirstTypeDAOImpl getFirsttypeDAO() { return firsttypeDAO; } public void setFirsttypeDAO(FirstTypeDAOImpl firsttypeDAO) { this.firsttypeDAO = firsttypeDAO; } public UserService getUserService() { return userService; } public void setUserService(UserService userService) { this.userService = userService; } @Override public String add() throws Exception { // TODO Auto-generated method stub return null; } @Override public String addView() throws Exception { // TODO Auto-generated method stub return null; } @Override public String delete() throws Exception { // TODO Auto-generated method stub return null; } @Override public String edit() throws Exception { // TODO Auto-generated method stub return null; } @Override public String editView() throws Exception { // TODO Auto-generated method stub return null; } @Override public String list() throws Exception { // TODO Auto-generated method stub return null; } //登录LoginAction public String Login() throws SQLException{ System.out.println(userService+"\n"+firsttypeDAO); // if(condition=="login"){ // System.out.println(user.getUser_name()); //// getSession().put("user_name", user.getUser_name()); //// getSession().put("password", user.getPassword()); //// getSession().put("user_lvl", user.getUser_lvl()); // System.out.println("登录成功"); // return LOGIN; // } // else{ // System.out.println("登录失败"); // return ERROR; // } return "login"; } @Override public String search() throws Exception { // TODO Auto-generated method stub return null; } }
package com.news.app.user; import java.sql.SQLException; import sun.common.ServiceDAO; import sun.common.newsService; import com.sun.dao.UserDAO; import com.sun.vo.UserExample; public class UserService implements newsService{