Stripes Learning (1)

Source: Internet
Author: User

Recently, the company has a project to use stripes + spring (Spring JDBC) development, built with Maven, Linux (UBUNTU) system, and WebSphere 6.0 for Web server.

Starting today, let's take a look at stripes to find out why it is superior to struts1.

Note: before development, ensure that the Java Development Environment (JDK 5 or above) and Maven are installed on the machine and are correctly configured.

1. Download stripes Maven plug-in, stripes-archetype-quickstart-1.0.jar download

2. Install the stripes-archetype-quickstart-1.0.jar to the maven local repository.

 
MVN install: Install-file-dfile = stripes-archetype-quickstart-1.0.jar-dgroupid = net. SourceForge-dartifactid = stripes-Archetype-Quickstart-dversion = 1.0-dpackaging = jar

3. Use the stripes plug-in to create the first stripes Project

 
MVN archetype: generate-nodes = stripes-Archetype-Quickstart-darchetypegroupid = net. SourceForge-darchetypeversion = 1.0-dgroupid = tutorial-dartifactid = helloworld

Note: if an error is reported in step 3:

 
Embedded error: Org. apache. maven. archetype. downloader. downloadnotfoundexception: Requested Org. apache. maven. archetypes: stripes-Archetype-Quickstart: jar: 1.0 download does not exist. unable to download the artifact from any Repository

The error message is that the maven plug-in Archetype is missing in. m2.

Download the downloaded resource here, decompress the downloaded resource, replace the $ home/. m2/Repository/org/Apache/Maven directory, and run the command again. It should be OK.

4. After the maven command is successfully executed, a helloworld project is displayed in the $ home (personal directory) directory, and then executed as follows:

 
CD helloworldmvn jetty: Run

5. After Jetty is successfully started, go to the browser to access http: // localhost: 8080/helloworld

You will see:

 
Congratulations, you 've set up a stripes project! You are running Java version 1.6.0 _ 24 on the Linux operating system.

In this way, the first project built with the maven stripes plug-in will be OK.

6. compile the project into an Eclipse project

 
MVN clean install

 
MVN Eclipse: Clean Eclipse: eclipse-dwtpversion = 1.5-ddownloadsources = true

After successful execution, you can import the project to eclipse.

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.