日期:2014-05-18  浏览次数:20744 次

有一个问题!!
package com.myEdition.action;

import java.io.IOException;
import java.sql.SQLException;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Scope;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

import com.myEdition.bean.User;
import com.myEdition.dao.UserDAO;
import com.myEdition.dao.impl.UserDAOImpl;
import com.myEdition.domain.Regedit;
import com.myEdition.domain.impl.Regeditlmpl;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
@SuppressWarnings("serial")
@Controller("regeditAction")
@Scope("prototype")
public class RegeditAction  {

//定义接口Regedit

private String username;
private String password;
 
@Autowired
private Regeditlmpl RegeditImpl;











public Regeditlmpl getRegeditImpl() {
return RegeditImpl;
}

public void setRegeditImpl(Regeditlmpl regeditImpl) {
RegeditImpl = regeditImpl;
}




public void setUsername(String username) {
this.username = username;
}

 public String getUsername() {
return username;
}



public void setPassword(String password) {
this.password = password;
}


public String getPassword() {
return password;
}




/* public void reg(String username,String password){
user.setPassword(password);
user.setUsername(username);

}*/

/*public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletExceptionIOException {
response.setContentType("text/html;charset=UTF-8"); 
HttpSession session = request.getSession(); 
//获取参数名称 

String username = request.getParameter("username"); 
String password = request.getParameter("password"); 

user.setUsername(username);
user.setPassword(password);
session.setAttribute("user", user);
RegeditImpl.saveUser(user);
//return "regedit";
request.getRequestDispatcher("regedit.jsp").forward(request, response);
}*/