Session session = request.getSession(true); 288. 289. session.setAttribute("checkcode", sRand); 290. 291. g.dispose(); 292. 293. try { 294. 295. ImageIO.write(image, "JPEG", response.getOutputStream()); 296. 297. } catch (IOException e) { 298. 299. e.printStackTrace(); 300. 301. } 302. 303. } 304. 305. 306.} [java] view plaincopyprint? 01.package csdn.dbshop.action; 02. 03.import org.apache.struts2.ServletActionContext; 04. 05.import csdn.dbshop.domain.Admin; 06.import csdn.dbshop.domain.Member; 07.import csdn.dbshop.service.BaseService; 08.import csdn.dbshop.service.MemberService; 09.import csdn.dbshop.service.impl.BaseServiceImpl; 10.import csdn.dbshop.service.impl.MemberServiceImpl; 11.import csdn.dbshop.util.Pagination; 12.import csdn.dbshop.util.StringUtil; 13. 14.import java.awt.Color; 15. 16.import java.awt.Font; 17. 18.import java.awt.Graphics; 19. 20.import java.awt.image.BufferedImage; 21. 22.import java.io.IOException; 23. 24.import java.util.Random; 25. 26.import javax.imageio.ImageIO; 27. 28.import javax.servlet.http.HttpServletRequest; 29. 30.import javax.servlet.http.HttpServletResponse; 31. 32.import javax.servlet.http.HttpSession; 33. 34.public class MemberAction extends BaseAction{ 35. private BaseService baseService = new BaseServiceImpl(); 36. private MemberService memberService = new MemberServiceImpl(); 37. private String cuemail; 38. private boolean cueflag; 39. private Member member; 40. private String acodet; 41. private boolean cacodet; 42. private String sRand = ""; 43. private String acode; 44. 45. public void setAcode(String acode) { 46. this.acode = acode; 47. } 48. 49. public boolean isCacodet() { 50. 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|