Spring 3 MVC and hibernate 3 example Part 1

Source: Internet
Author: User
This tutorial explains how to use annotations with spring 3 MVC and hibernate 3 based application to make the development easier and faster than ever before.

Spring 3 MVC and hibernate 3 example application using annotations

This tutorial explains how to use annotations with spring 3 MVC and hibernate 3 based application to make the development easier and faster than ever before. you can download also the application (including all jar files required), we are going to explain.

The application directory structure shoshould look like as below, if you are developing the application in eclipse.

Project Structure:

Jar files required:

Here is the list of jar files required for the application. (jar files are stored with the application download .)

Web. xml:

You must be aware of how spring is configured in Web. xml. Here is the Web. xml we configured for our application. All HTML requests are processed via spring.

<?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">

<Servlet>

<Servlet-name>Dispatcher</Servlet-name>

<Servlet-class>Org. springframework. Web. servlet. dispatcherservlet</Servlet-class>

<Load-on-startup>1</Load-on-startup>

</Servlet>

<Servlet-Mapping>

<Servlet-name>Dispatcher</Servlet-name>

<URL-Pattern>*. Html</URL-Pattern>

</Servlet-Mapping>

<Welcome-file-list>

<Welcome-File>Index.html</Welcome-File>

</Welcome-file-list>

</Web-app>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.