See the online article has a lot of ssh configuration, but there is a lot of the tune does not make sense, there are versions, not exactly the same configuration, the following is my configuration to do the ssh tutorial development for reference;
This article has pictures, please download the attachment, and attachment for the diagram tutorial landing function register contains implementation examples and detailed clarity.
Development Environment: MyEclipse6.0 + Tomcat5.0 + SQLServer2000
Configure the environment: Struts2 + Spring2 + Hibernate3.1
1, the first Java-Web Project to create project, select J2EE 5.0 version

A lot of the Internet to see the bottom from the hibernate configuration, but the personal feeling is too much trouble, if you so from the hibernate configuration, it is easy to miss something personal experience or action from the control layer configuration;
Note: in the configuration before the first under the Tomcat installation directory (C: \ Program Files \ Apache Software Foundation \ Tomcat 5.0 \ common \ endorsed) the xml-apis.jar files to remove, and then carry out the work of the following, otherwise it is impossible to release test .
Delete the original document
2, configure Struts2
(1) add the Struts2 framework packages:
① commons-logging-1.0.4.jar
② commons-fileupload-1.2.1.jar
③ freemarker-2.3.13.jar
④ ognl-2.6.11.jar
⑤ struts2-core-2.1.6.jar
⑥ xwork-2.1.2.jar
(2) the creation of struts.xml document (Note: must be at the root src)
Code is as follows:
<? xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE struts PUBLIC
"- / / Apache Software Foundation / / DTD Struts Configuration 2.1 / / EN"
"http://struts.apache.org/dtds/struts-2.1.dtd">

<struts>
<package name="struts2" extends="struts-default">

</ package>
</ struts>
(3) web.xml configuration file, add the Struts2 core controller
Code is as follows:
<? xml version = "1.0" encoding = "UTF-8"?>
<web-app version = "2.5"
xmlns = "http://java.sun.com/xml/ns/javaee"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd ">
<welcome-file-list>
<welcome-file> index.jsp </ welcome-file>
</ welcome-file-list>
<filter>
<filter-name> struts2 </ filter-name>
<filter-class> org.apache.struts2.dispatcher.FilterDispatcher </ filter-class>
</ filter>
<filter-mapping>
<filter-name> struts2 </ filter-name>
<url-pattern> / * </ url-pattern>
</ filter-mapping>
</ web-app>
(Note: org.apache.struts2.dispatcher.FilterDispatcher path in the struts-core-2.1.6.jar under the package)

Test release, Struts2 configuration completed development environment.
Note: When configured to complete a development component, the U.S. releases about tomcat in order to easily search the error, otherwise all of the environment configuration after a bad error checking.

3, configuration Spring2
(1) the development of aircraft Spring2 add package
① spring.jar
② struts2-spring-plugin-2.1.6.jar
(2) create a Spring configuration file applictionContext.xml, by IDE tools (MyEclipse6)
Selected SSHDemo1, right-click
Menu select "MyEclipse" option, point to "Project Capabilities", select "Add Spring Capabilities";

Spring version for select Spring2, JAR Libraay Installation of the election "Copy ...";
Click "Next",

Whether or not the option to create ways to create or coverage already exists, select the "NEW", select the path applicationContext.xml files, click "Browse", created in the project WebRoot / WEB-INF path, click "OK",

Click "Finish", finish.

If the configuration successfully, when you look at our projects in the applicationContext.xml file already exists on paper. Project into the Spring following the development of automatic support package.

applicationContext.xml
Code is as follows:
<? xml version = "1.0" encoding = "UTF-8"?>
<beans
xmlns = "http://www.springframework.org/schema/beans"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemaLocation = "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

</ beans>
Next configure the web.xml file, add the spring Listener
Add the following code:
<listener>
<listener-class> org.springframework.web.context.ContextLoaderListener </ listener-class>
</ listener>
(Note: org.springframework.web.context.ContextLoaderListener path at the next packet Spring.jar)

Test release, Spring2 development environment configuration finished.
4, configure Hibernate
First of all before you want to configure database connection pool, if there are some steps, then do not have the
Create a database connection pool, follow these steps:
(I use SQLServer2000, the SQLServer2005 If so, you can select, enter the project name)
(1) open the DB Browser, create a data source, configure as follows:
Driver template: select "Mcrosoft SQL Server" (to use select the database type, this is SQL Server2000)
Driver name: the creation of the data source name (custom)
Connection URL: driver used to connect the database URL (or the database connection string)
User name: database username Login
Password: database password
Driver JARS: Import Connect JDBC driver package (database-driven category)
msbase.jar
msutil.jar
mssqlserver.jar
Driver classname: JDBC driver (Driver template when the selection, he was automatically selected)

If nothing of the case, open the DB Browser, should be only one default connection is MyEclipse own database, "MyEclipse Derby"

Right-click, select "New"
Open the data source driver to connect the new "Database Driver"

SQLServer2000 configuration is as follows: Driver Name Here made by the first name he Driver Classname the same, easy to understand, click on "Finish" to complete.

(2) the creation is complete, open the "Open ...", test the connection.
If there is similar to "Can not Connect Connection URL: 1433",
Necessary to do some work:
MS SQL Server test of sp3 (sp4) to install the patch?
Whether or not start the SQL Server database server
In dos type interface: telnet localhost 1433
If the show: is connected to the localhost ... Can not open connection to the host, on port 1433: Connection failed. Description sp3 (sp4) meeting
D is not installed. To install the sp3 (sp4) patch. Installed, at this time to stop the server automatically, manually start the server, test the connection through.

Database connection pool configuration has finished, start to add support for hibernate, as:
Menu select "MyEclipse" option, point to "Project Capabilities";
Choose "Add Hibernate Capabilities";

Choose Hibernate version Hibernate3.1;
JAR Libraay Installation of the election "Copy ...";
Click "Next",

Click "Next", in "Hibernate Configueration", the
Check the "Spring configuration file (applicationContext.xml)"; the use of spring in the management of the applicationContext.xml file to hibernateBean

Click "Next", select "Exiting Spring Contfiguration file",
At "SessionFactory ID" option, type "sessionFactory";

Click "Next", to configure the data source, in the "Bean Id" Enter dataSource
Selected use JDBC Driver
DB Driver selection of a database connection, here is set up above us the name of the Driver Name, you can select it. (This database can be opened to connect the myeclipse to create a DB Browser view);

Point "Next", uncheck the Create SessionFactory class options, click finish.

At this point in the applicationContext.xml file to generate the corresponding driver and data source information, are as follows:
<bean
class = "org.apache.commons.dbcp.BasicDataSource">
<property name = "driverClassName"
value = "com.microsoft.jdbc.sqlserver.SQLServerDriver">
</ property>
<property name = "url"
value = "jdbc: microsoft: sqlserver: / / localhost: 1433">
</ property>
<property name="username" value="sa"> </ property>
<property name="password" value="sa"> </ property>
</ bean>
<bean
class = "org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</ property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</ prop>
</ props>
</ property>

4, this time in the "applicationContext.xml" file error, class = "org.apache.commons.dbcp.BasicDataSource"> can not find this class,

Optional items, right-choice property,

Select "java build path", select "Libraries", click "add library" button, select "MyEclipse Libraries", click on the "Next";

Choose "Spring 2.0 Persistence JDBC Libraries", at this time the system will automatically select the other option,
Click "Finish", click "OK";

At this point the error will disappear.

Above Struts2 + Spring2 + Hibernate3.1 development environment to build finished.
Start Tomcat, enter in the address bar: http://localhost:8080/SSHDemo1