MyEclipse2014 Creating a new Web project and configuring SSH

Source: Internet
Author: User

Environment:

myeclipse2014

Win10

jdk1.7

Tomcat8


1. Create a WEB project, Filenewweb Project, with the following settings:

finish, new project completed

2. Add Spring, right-click the project name selection: Myeclipseproject Facts [Capabilities]install Spring Facet, as follows:

3. To add hibernate, you first need to create a database connection and then add Hibernate. Here is the example of MySQL

First open the Database Explorer window:

New Connection

After setting it up, click: Test Driver, the tests show successfully:

Next

New successful, can now connect:

You can now open tables and views for the corresponding scenario, and so on:

Add Hibernate, right-click the project name selection: Myeclipseproject Facts [Capabilities]install Hibernate Facet, as follows:

4. Add Struts and right click on Project name selection: Myeclipseproject Facts [Capabilities]install Apache Struts (2.x) Facet, as follows:

SSH Setup Completed:

Publish Web site, Test success:






Maybe we'll use the jar package we downloaded, so we can remove the following jar packages




Create Hibernate.cfg.xml in SRC

The contents are as follows

<?xml version= ' 1.0 ' encoding= ' UTF-8 '? ><! DOCTYPE hibernate-configuration public          "-//hibernate/hibernate configuration DTD 3.0//en"          "http// Hibernate.sourceforge.net/hibernate-configuration-3.0.dtd "><!--Generated by MyEclipse hibernate Tools.                   -->


Modify Applicationcontext.xml

The contents are as follows

<?xml version= "1.0" encoding= "UTF-8"? ><beansxmlns= "Http://www.springframework.org/schema/beans" xmlns: Xsi= "Http://www.w3.org/2001/XMLSchema-instance" xmlns:p= "http://www.springframework.org/schema/p" xsi: schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans-3.1.xsd "><!--indicate the location of hibernate configuration files  --><bean id=" sessionfactory "    class=" Org.springframework.orm.hibernate3.LocalSessionFactoryBean ">   <property name=" configlocation "value=" Classpath:hibernate.cfg.xml "/></bean>  </beans>


After this modification, the deployment runs and works correctly



MyEclipse2014 Creating a new Web project and configuring SSH

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.