---
title: "先学一个星期....."
author: "lrain0813"
date: "2010-07-19T19:38:00Z"
tags: ["Ajax", "Hibernate", "Spring", "XML", "jQuery"]
slug: "untitled"
draft: false
lastmod: "2010-07-19T19:38:00Z"
id: 894980
url: "https://lrain0813.iteye.com/blog/894980"
---

实习,第一个任务,先学一个星期...

唉~~ 好好学习吧...耐住性子...学一个星期!!!

想想要学什么....

struts2 传参,跳转

1&gt;form表单 action属性 表单将要提交给的action

2&gt;struts.xml配置文件 查找对应action类

3&gt;处理得到result 根据result跳转页面

hibernate 简单的插入删除

1&gt;xxx.hdb.xml配置实体类与数据库表的映射关系

2&gt;在hibernate.cfg.xml hibernate配置文件中 添加 resources属性 配置xxx.hdb.xml文件

3&gt;new Configuration().configure().bulidSessionFactory()得到sessionFactory对象,(一般只需要一个即可,使用spring框架注入...)

4&gt;sf.getCurrentSession();得到session对象

5&gt;session.beginTransaction();开始一个事务

6&gt;session.save(实体类对象);等操作

7&gt;session.getTransaction().commit();提交事务

8&gt;sf.close();

spring 注入

1&gt;接口类如:UserDao// UserManager

2&gt;接口实现类如:UserDaoImpl // UserManagerImpl

3&gt;在beans.xml中配置 动态装配对应的实现类

4&gt;ApplicationContext ac= new ClassPathXmlApplicationContext("spring 配置文件 如beans.xml");

5&gt;通过applicationContext对象的(这里得到的是Object对象需要强制类型转换)ac.getBean("bean name");得到spring给注入的对象,由相应的接口引用接收如 UserDao userDao;

html

css 各种属性

java script 表单验证

ajax 有空看看

jquery ? 有空看看