How to create a maven project in Eclipse Jee and convert it to a dynamic Web project

Source: Internet
Author: User
Tags apache tomcat

I. Creating a MAVEN Project
    1. Select File->new->other->maven->maven Project in the Eclipse's menu bar
    2. Next, choose Create a simple project (skip archetype selection),

    3. After entering group Id,archive id,packaging after the next step, click Finish,

    4. After the successful creation of the file directory,

Two. Dynamic Web Project converted to Java
    1. Right-click the project name and select Properties
    2. Select Project Facets->convert to faceted from ...,

    3. Choose dynamic Web module,version to 2.5 (3.0 version I have not tested is feasible), select Java,version to 1.6, and click further configuration available ...

    4. To modify content directory to/src/main/webapp/, click OK,

    5. Finally click Properties for showcase OK to complete the conversion, the last directory structure,

Three. Modify the Java Build Path
    1. Right-click the project name and select Properties
    2. Select Java build Path, remove the JRE 1.5 version, then click the Add Library,

    3. Select the JRE System Library, click Next,

    4. Select the Jdk6 version you set, click Finish,

    5. Finally click OK to complete the setup,

Four. Modify the Java Compile
    1. Right-click the project name and select Properties
    2. Select Java Compiler, and select Compiler compliance level of 1.6,

Five. Modify Deployment Assembly
    1. Right-click the project name and select Properties
    2. Select Deployment Assembly, and click Add,

    3. Select Java Build Path Entries, click Next,

    4. Select Maven Dependencies, click Finish,

    5. It is best to click OK to complete the setup,

Six. Set up server Apache Tomcat
    1. Menu Bar Select Window->show view->servers
    2. Click the New Server Wizard,

    3. Select Tomcat v6.0 Server, click Next,

    4. Select Browse, select the correct Apache Tomcat installation directory, then click Next,

    5. Select the project you want to deploy, such as Showcase, then click Add, click Finish,

      Xxx

      Attention:

      Prompt for this when add and remove: Tomcat version 6.0 only supports EE 1.2, 1.3, 1.4, and Java EE 5 Web Modules

    6. After you have finished setting up the project

    7. On Servers view, double-click Tomat v6.0 Server at localhost[stopped Republish],

    8. Modify the project's deployment directory to the Tomcat installtion directory,

    9. Modify the access path of the project, that is, remove the showcase such as the http://localhost/showcase/directory,

    10. Turn off auto reloading enabled so that it doesn't need to be automatically deployed every time you modify a file.

    11. Right-click Tocmat v6.0 Server at localhost[stopped republish] and click Clean to complete the deployment of Web project.

    12. Finally, the deployment of the Tomcat directory was successful,

Seven. Run the project in Apache Tomcat
    1. Select Debug to debug the project, select Run to run the project,


How to create a maven project in Eclipse Jee and convert it to a dynamic Web project

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.