Skip to content

Commit 7f4c715

Browse files
authored
Struts2 refactoring (eugenp#1176)
* Modifications to model on Hibernate One to manyTutorial * Modifications to model on Hibernate One to manyTutorial * Modifications to model on Hibernate One to manyTutorial * Simple Genetic Algorithm improvements * Struts2 refactoring
1 parent cf87412 commit 7f4c715

11 files changed

Lines changed: 57 additions & 58 deletions

File tree

‎core-java/0.004102810554955205‎

Whitespace-only changes.

‎core-java/0.04832801936270381‎

Whitespace-only changes.

‎core-java/0.5633433244738808‎

Whitespace-only changes.

‎core-java/0.6256429734439612‎

Whitespace-only changes.

‎core-java/0.9799201796740292‎

Whitespace-only changes.

‎struts2/WebContent/WEB-INF/web.xml‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xmlns="http://java.sun.com/xml/ns/javaee"
4-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
5-
id="WebApp_ID" version="3.0">
6-
<display-name>MyStrutsApp</display-name>
7-
<filter>
8-
<filter-name>struts2</filter-name>
9-
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
10-
</filter>
11-
12-
<filter-mapping>
13-
<filter-name>struts2</filter-name>
14-
<url-pattern>/*</url-pattern>
15-
</filter-mapping>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
3+
<display-name>struts</display-name>
4+
<filter>
5+
<filter-name>struts2</filter-name>
6+
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
7+
</filter>
8+
<filter-mapping>
9+
<filter-name>struts2</filter-name>
10+
<url-pattern>/*</url-pattern>
11+
</filter-mapping>
1612
</web-app>

‎struts2/pom.xml‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<artifactId>MyStrutsApp</artifactId>
66
<version>0.0.1-SNAPSHOT</version>
77
<packaging>war</packaging>
8-
<name>MyStrutsApp</name>
8+
<name>struts</name>
99
<build>
10-
<sourceDirectory>src</sourceDirectory>
10+
<sourceDirectory>src/main/java</sourceDirectory>
1111
<resources>
1212
<resource>
13-
<directory>src</directory>
13+
<directory>src/main/resources</directory>
1414
</resource>
1515
</resources>
1616
<plugins>
@@ -32,28 +32,35 @@
3232
</plugins>
3333
</build>
3434
<dependencies>
35-
<!-- http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22struts2-core%22 -->
35+
<dependency>
36+
<groupId>junit</groupId>
37+
<artifactId>junit</artifactId>
38+
<version>4.12</version>
39+
</dependency>
3640
<dependency>
3741
<groupId>org.apache.struts</groupId>
3842
<artifactId>struts2-core</artifactId>
3943
<version>2.5.5</version>
4044
</dependency>
41-
<!-- http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22struts2-core%22 -->
4245
<dependency>
4346
<groupId>org.apache.struts</groupId>
4447
<artifactId>struts2-junit-plugin</artifactId>
4548
<version>2.5.5</version>
4649
</dependency>
47-
<!-- http://search.maven.org/#search%7Cga%7C1%7Cstruts2-convention-plugin -->
4850
<dependency>
4951
<groupId>org.apache.struts</groupId>
5052
<artifactId>struts2-convention-plugin</artifactId>
5153
<version>2.5.8</version>
5254
</dependency>
5355
<dependency>
54-
<groupId>javax.servlet</groupId>
55-
<artifactId>javax.servlet-api</artifactId>
56-
<version>3.0.1</version>
57-
</dependency>
56+
<groupId>javax.servlet</groupId>
57+
<artifactId>javax.servlet-api</artifactId>
58+
<version>3.0.1</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.springframework</groupId>
62+
<artifactId>spring-core</artifactId>
63+
<version>4.3.6.RELEASE</version>
64+
</dependency>
5865
</dependencies>
5966
</project>

‎struts2/src/com/baeldung/struts/test/TestCarAction.java‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

struts2/src/com/baeldung/struts/CarAction.java renamed to struts2/src/main/java/com/baeldung/struts/CarAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.apache.struts2.convention.annotation.Action;
44
import org.apache.struts2.convention.annotation.Namespace;
55
import org.apache.struts2.convention.annotation.Result;
6-
import org.apache.struts2.convention.annotation.ResultPath;
76

87
@Namespace("/tutorial")
98
@Action("/car")

struts2/src/com/baeldung/struts/CarMessageService.java renamed to struts2/src/main/java/com/baeldung/struts/CarMessageService.java

File renamed without changes.

0 commit comments

Comments
 (0)