Eclipse develops hibernate-based web systems

Source: Internet
Author: User

1. Create a web system with eclipse


2. Create the user libraries required by the system. For example: Hibernate, JDBC, Tomcat (servlet), upload (for uploading files), etc.






Note: Configure user libraries to be copied to the Tomcat webapps/in your project/web-inf/lib at compile time, configured as follows:



3. Hibernate configuration Instructions



Where Hibernate.cfg.xml is the core configuration file for Hibernate,



It configures the contents of JDBC, and also configures all of your. hbm.xml file properties, and <mapping resource= "..."/> otherwise hibernate cannot find this table.

The two. Hbm.xml for each of the two tables that were created by the reverse engineering tool for Eclipse. The specific steps are:

1, http://www.cnblogs.com/whjblogs/p/3137385.html

2, http://blog.csdn.net/wangpeng047/article/details/6877720

4. Upload files asynchronously using Ajax

A temporary workaround is to configure a non-file property as a get parameter to transmit past the request address.

We can solve this problem in some aspects of encapsulation, with some mature upload controls.

Reference: Http://stackoverflow.com/questions/20795449/jquery-ajax-form-submission-enctype-multipart-form-data-why-does-contentt




Issue record:

Problem with jquery naming conflicts.

First, jquery is introduced, so that jquery's $ is in effect, and then at the beginning of the execution of the script, the use of the $ is allowed to define their own aliases. such as: Var $j =$.noconflict ();















Eclipse develops hibernate-based web systems

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.