firebug火狐插件mysqlbrowser mysql客户端gui“你好”.equals(reportInfo.reportNo)breakpoint断点使用session使用设置session if (results != null) { if(ActionContext.getContext().getSession().containsKey("caseList")==true) ActionContext.getContext().getSession().remove("caseList"); ActionContext.getContext().getSession().put("caseList", results); ActionContext.getContext().getSession().put("startDate", s_para_startDate); ActionContext.getContext().getSession().put("endDate", s_para_endDate); }取到session List<ReportInfo> reportInfoList = new ArrayList<ReportInfo>(); if(ActionContext.getContext().getSession().containsKey("caseList")==true){ reportInfoList = (List<ReportInfo>)ActionContext.getContext().getSession().get("caseList"); s_para_startDate = (String) ActionContext.getContext().getSession().get("startDate"); s_para_endDate = (String)ActionContext.getContext().getSession().get("endDate"); } Action返回List@SuppressWarnings("unchecked") @Override public List<Dictionary> findBySource2(String source) { String sql = "select e from ReportInfo e where e.repOrOpinion='0' and e.source=?1"; Query query = em.createQuery(sql); query.setParameter(1, source); return query.getResultList(); }Action返回Object@Override public ApplicationAttachment findById(long applicationId){ Query query = em.createNativeQuery("select * from applicationAttachment e where e.application_id=?1",ApplicationAttachment.class); query.setParameter(1, applicationId); if(!query.getResultList().isEmpty()){ ApplicationAttachment appAttachment = (ApplicationAttachment)query.getSingleResult(); return appAttachment; }else{ return null; } }<!-- 邮件发送bean163 --> <bean id="mailSender163" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host"> <value>smtp.163.com</value> </property> <property name="username"> <value>zj12380@163.com</value> </property> <property name="password"> <value>123456</value> </property> <property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.timeout">25000</prop> </props> </property> </bean> //获取上述配置文件 ApplicationContext context = new ClassPathXmlApplicationContext("/cn/hdu/test/applicationContext.xml"); //按照bean名字获取JavaMailSender JavaMailSenderImpl senderimpl = (JavaMailSenderImpl)context.getBean("mailSender163"); mailmessage.setFrom(senderimpl.getUsername());