Usually we use APPFUSE2.0 project into eclipse, the compiler can not be normal, can only use maven
I feel very uncomfortable, after exploring and found that after such a configuration, it will make it easier for a lot of, but also has been directly in the eclipse to run the tomcat
U.S. likely to appfuse2.0 have been very familiar with, if you do not know is very casual online portal have been found stability.
appfuse official website address: http://appfuse.org/display/APF/Home
I have been following the example Struts 2 Basic Introduction about:
1. At my D:, create a folder appfuse-cww,
For example, D: \ appfuse2-cww \
2. At the command line, type mvn archetype: create-DarchetypeGroupId = org.appfuse.archetypes-DarchetypeArtifactId = appfuse-basic-struts-DremoteRepositories = http://static.appfuse.org/releases-DarchetypeVersion=2.0.1-DgroupId = com.mycompany.app-DartifactId = myproject
3. If you have database root user password, you can create the item in your document set up under the pom.xml click <! - Database settings ->
4. At the command line, cd to your project directory, run mvn, this command will complete the relevant jar download Tomcat package and run your project's integration testing. Above command required approximately 5-10 minutes.
5. At your project directory run mvn jetty: run-war, you can go to view your project has. Maven will start Jetty, this is the case, you can use this address: http://localhost:8080 in your browser to browse.
6. Download the full source code, and then perform the following command mvn appfuse: full-source.
7. The implementation of mvn eclipse: eclipse to generate eclipse project information document.
8. Using eclipse import project.
9. Delete maven generated class library, select the project right-select "properties" -> "java build path" -> "libraries" delete all M2_REPO the lib
10. Generating web project, select Project Right Choice "myeclipse" -> "add web project capabilities", then select "web root Directory" for the "src / main / webapp"
Configuration successful!
In this way, you can use maven2 to start, can also be used to start TOMCAT
Note: At this time in the startup maven no problem, but at start tomcat, it will error. This time we need to make some corrections
jdbc.properties document
#jdbc.driverClassName=${jdbc.driverClassName}
jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.url=${jdbc.url}
jdbc.url=jdbc:mysql://localhost/myproject?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8
#jdbc.username=${jdbc.username}
jdbc.username=root
#jdbc.password=${jdbc.password}
#我的数据库密码是1234
jdbc.password=1234
#hibernate.dialect=${hibernate.dialect}
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# Needed by Hibernate3 Maven Plugin defined in pom.xml
hibernate.connection.username=${jdbc.username}
hibernate.connection.password=${jdbc.password}
hibernate.connection.url=${jdbc.url}
hibernate.connection.driver_class=${jdbc.driverClassName}







