Steps for creating a web project using maven (text), mavenweb

Source: Internet
Author: User

Steps for creating a web project using maven (text), mavenweb

The current project uses MAVEN to manage jar packages. This is the first time I have been familiar with maven. I feel very good that I no longer need to add or download jar packages one by one, you can configure it directly in the maven configuration file. maven can help us automatically download it. Very convenient. I was too busy to sort it out. Now I want to sort it out, record it, and make a better impression. Of course, maven is only the most basic and many other functions are not used. This article only describes how to create a maven project without any other features.

Environment build reference previous blog: http://www.bkjia.com/article/131269.htm

Below is recommended 2 maven find jar package configuration site, just need to search keywords to find the Jar package needed, very convenient, such as: mysql can find the mysql-connect-java.jar.

Http://search.maven.org/#search%7Cga%7C1%7Cmybatis

Http://mvnrepository.com/

The following is a graphic Tutorial:

1. Create a maven project, as shown in the figure below:






2. Follow the steps above to create a maven project and see the most directory structure. However, this directory structure is incorrect and requires some modifications.

First of all, in order to avoid garbled code, we should replace the project code with a UTF-8, after the project code are using a UTF-8, add a character encoding filter, garbled code will no longer "messy" (do not mean no, but it is easier to solve ).


Again, perform operations according to the solution (set JRE as the default), so that a complete and correct directory structure will appear. I am not very clear about the reason, it should be a BUG:



Finally, there is an index. jsp error. We need to introduce the java ee jar package. Introduce the following in pom. xml:

<! -- Import the java ee jar package --> <dependency> <groupId> javax </groupId> <artifactId> javaee-api </artifactId> <version> 7.0 </version> </dependency>

So far, the complete directory structure and the correct project have been completed. Next, perform some configuration. After all, it is a web project and jstl is required. The configuration is as follows:


The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.