diff --git a/pom.xml b/pom.xml index 6f214aedc5..255693b5be 100644 --- a/pom.xml +++ b/pom.xml @@ -621,7 +621,6 @@ static-analysis stripe - struts tensorflow-java testing-modules @@ -1017,7 +1016,6 @@ static-analysis stripe - struts tensorflow-java testing-modules diff --git a/struts/README.md b/struts/README.md deleted file mode 100644 index d15b94f662..0000000000 --- a/struts/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Struts 2 - -This module contains articles about Struts 2 - -### Relevant articles - -- [A Quick Struts 2 Intro](https://www.baeldung.com/struts-2-intro) diff --git a/struts/WebContent/WEB-INF/web.xml b/struts/WebContent/WEB-INF/web.xml deleted file mode 100644 index 8f1b55943c..0000000000 --- a/struts/WebContent/WEB-INF/web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - struts - - struts2 - org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter - - - struts2 - /* - - \ No newline at end of file diff --git a/struts/WebContent/input.jsp b/struts/WebContent/input.jsp deleted file mode 100644 index 6d80aa3ffd..0000000000 --- a/struts/WebContent/input.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - - -Baledung Struts - - -
-

Welcome to Baeldung Struts 2 app

-

Which car do you like !!

-

Please choose ferrari or bmw

- - -
- - \ No newline at end of file diff --git a/struts/WebContent/result.jsp b/struts/WebContent/result.jsp deleted file mode 100644 index 0fe9ea2d1d..0000000000 --- a/struts/WebContent/result.jsp +++ /dev/null @@ -1,11 +0,0 @@ -<%@ page contentType="text/html; charset=UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - - -Hello World - - -

Hello Baeldung User

-

You are a

- - diff --git a/struts/pom.xml b/struts/pom.xml deleted file mode 100644 index a668ea29db..0000000000 --- a/struts/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - 4.0.0 - struts - 0.0.1-SNAPSHOT - struts - pom - - - com.baeldung - parent-spring-4 - 0.0.1-SNAPSHOT - ../parent-spring-4 - - - - - org.apache.struts - struts2-core - ${struts2.version} - - - org.apache.struts - struts2-junit-plugin - ${struts2.version} - - - org.apache.struts - struts2-convention-plugin - ${struts2-convention-plugin.version} - - - javax.servlet - javax.servlet-api - ${javax.servlet-api.version} - - - org.springframework - spring-core - ${spring.version} - - - commons-logging - commons-logging - - - - - - - src/main/java - - - src/main/resources - - - - - maven-war-plugin - ${maven-war-plugin.version} - - WebContent - - - - - - - 2.5.5 - 2.5.8 - 4.3.6.RELEASE - - - \ No newline at end of file diff --git a/struts/src/main/java/com/baeldung/struts/CarAction.java b/struts/src/main/java/com/baeldung/struts/CarAction.java deleted file mode 100644 index 478f3b4cc2..0000000000 --- a/struts/src/main/java/com/baeldung/struts/CarAction.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.baeldung.struts; - -import org.apache.struts2.convention.annotation.Action; -import org.apache.struts2.convention.annotation.Namespace; -import org.apache.struts2.convention.annotation.Result; - -@Namespace("/tutorial") -@Action("/car") -@Result(name = "success", location = "/result.jsp") -public class CarAction { - private String carName; - private String carMessage; - private CarMessageService carMessageService = new CarMessageService(); - - public String execute() { - System.out.println("inside execute(): carName is" + carName); - this.setCarMessage(this.carMessageService.getMessage(carName)); - return "success"; - } - - public String getCarName() { - return carName; - } - - public void setCarName(String carName) { - this.carName = carName; - } - - public String getCarMessage() { - return carMessage; - } - - public void setCarMessage(String carMessage) { - this.carMessage = carMessage; - } - -} diff --git a/struts/src/main/java/com/baeldung/struts/CarMessageService.java b/struts/src/main/java/com/baeldung/struts/CarMessageService.java deleted file mode 100644 index 34d3ca3d76..0000000000 --- a/struts/src/main/java/com/baeldung/struts/CarMessageService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.baeldung.struts; - -public class CarMessageService { - - public String getMessage(String carName) { - System.out.println("inside getMessage()" + carName); - if (carName.equalsIgnoreCase("ferrari")){ - return "Ferrari Fan!"; - } - else if (carName.equalsIgnoreCase("bmw")){ - return "BMW Fan!"; - } - else{ - return "please choose ferrari Or bmw"; - } - } - -} diff --git a/struts/src/main/resources/logback.xml b/struts/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/struts/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java b/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java deleted file mode 100644 index 64b640edfb..0000000000 --- a/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java +++ /dev/null @@ -1,29 +0,0 @@ -//package com.baeldung.struts.test; -// -//import org.apache.struts2.StrutsTestCase; -//import org.junit.Test; -// -//import com.baeldung.struts.CarAction; -//import com.opensymphony.xwork2.ActionProxy; -// -//public class CarActionTest extends StrutsTestCase { -// -// public void testgivenCarOptions_WhenferrariSelected_ThenShowMessage() throws Exception { -// request.setParameter("carName", "ferrari"); -// ActionProxy proxy = getActionProxy("/tutorial/car.action"); -// CarAction carAction = (CarAction) proxy.getAction(); -// String result = proxy.execute(); -// assertEquals(result, "success"); -// assertEquals(carAction.getCarMessage(), "Ferrari Fan!"); -// } -// -// public void testgivenCarOptions_WhenbmwSelected_ThenShowMessage() throws Exception { -// request.setParameter("carName", "bmw"); -// ActionProxy proxy = getActionProxy("/tutorial/car.action"); -// CarAction carAction = (CarAction) proxy.getAction(); -// String result = proxy.execute(); -// assertEquals(result, "success"); -// assertEquals(carAction.getCarMessage(), "BMW Fan!"); -// } -// -//}