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.