You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by sd...@apache.org on 2017/04/23 21:51:59 UTC

[1/8] struts-examples git commit: changed indentation in java files

Repository: struts-examples
Updated Branches:
  refs/heads/master 51a2f1874 -> 15c545e0d


changed indentation in java files


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/7f6f7c8c
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/7f6f7c8c
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/7f6f7c8c

Branch: refs/heads/master
Commit: 7f6f7c8c3ab05704c87a96e863124c42a47263f6
Parents: 51a2f18
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 17:52:51 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 17:52:51 2017 +0200

----------------------------------------------------------------------
 .../helloworld/action/HelloWorldAction.java     | 107 +++++++++----------
 .../struts/helloworld/model/MessageStore.java   |  35 +++---
 2 files changed, 67 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7f6f7c8c/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
index 1285010..95b7408 100644
--- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
+++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
@@ -13,67 +13,62 @@ import org.apache.struts.helloworld.model.MessageStore;
  */
 public class HelloWorldAction extends ActionSupport {
 
-	private static final long serialVersionUID = 1L;
-	
-	/**
-	 * The model class that stores the message
-	 * to display in the view.
-	 */
-	private MessageStore messageStore;
-	
-	private static int helloCount = 0;
-	
-	public int getHelloCount() {
-		return helloCount;
-	}
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * The model class that stores the message
+     * to display in the view.
+     */
+    private MessageStore messageStore;
+    
+    private static int helloCount = 0;
+    
+    public int getHelloCount() {
+        return helloCount;
+    }
 
-	public void setHelloCount(int helloCount) {
-		HelloWorldAction.helloCount = helloCount;
-	}
-	
-	private String userName;
+    public void setHelloCount(int helloCount) {
+        HelloWorldAction.helloCount = helloCount;
+    }
+    
+    private String userName;
 
-	public String getUserName() {
-		return userName;
-	}
+    public String getUserName() {
+        return userName;
+    }
 
-	public void setUserName(String userName) {
-		this.userName = userName;
-	}
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
 
-	/*
-	 * Creates the MessageStore model object, 
-	 * increase helloCount by 1 and 
-	 * returns success.  The MessageStore model
-	 * object will be available to the view.
-	 * (non-Javadoc)
-	 * @see com.opensymphony.xwork2.ActionSupport#execute()
-	 */
-	public String execute() throws Exception {
-		
-		messageStore = new MessageStore() ;
-		
-		//Action included a query string parameter of userName
-		//or a form field with name of userName
-		if (userName != null) {
-			
-			messageStore.setMessage( messageStore.getMessage() + " " + userName);
-			
-		}
-		
-		helloCount++;
-		
-		return SUCCESS;
-	}
+    /*
+     * Creates the MessageStore model object, 
+     * increase helloCount by 1 and 
+     * returns success.  The MessageStore model
+     * object will be available to the view.
+     * (non-Javadoc)
+     * @see com.opensymphony.xwork2.ActionSupport#execute()
+     */
+    public String execute() throws Exception {
+        messageStore = new MessageStore() ;
+        
+        //Action included a query string parameter of userName
+        //or a form field with name of userName
+        if (userName != null) {
+            messageStore.setMessage( messageStore.getMessage() + " " + userName);
+        }
+        
+        helloCount++;
+        
+        return SUCCESS;
+    }
 
-	public MessageStore getMessageStore() {
-		return messageStore;
-	}
+    public MessageStore getMessageStore() {
+        return messageStore;
+    }
 
-	public void setMessageStore(MessageStore messageStore) {
-		this.messageStore = messageStore;
-	}
-	
-	
+    public void setMessageStore(MessageStore messageStore) {
+        this.messageStore = messageStore;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/7f6f7c8c/coding-actions/src/main/java/org/apache/struts/helloworld/model/MessageStore.java
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/model/MessageStore.java b/coding-actions/src/main/java/org/apache/struts/helloworld/model/MessageStore.java
index b7fceeb..d732494 100644
--- a/coding-actions/src/main/java/org/apache/struts/helloworld/model/MessageStore.java
+++ b/coding-actions/src/main/java/org/apache/struts/helloworld/model/MessageStore.java
@@ -6,26 +6,23 @@ package org.apache.struts.helloworld.model;
  *
  */
 public class MessageStore {
-	
-	private String message;
-	
-	public MessageStore() {
-		
-		setMessage("Hello Struts User");
-	}
+    
+    private String message;
+    
+    public MessageStore() {
+        setMessage("Hello Struts User");
+    }
 
-	public String getMessage() {
-		return message;
-	}
+    public String getMessage() {
+        return message;
+    }
 
-	public void setMessage(String message) {
-		this.message = message;
-	}
-	
-	public String toString() {
-		
-		return message + " (from toString)";
-		
-	}
+    public void setMessage(String message) {
+        this.message = message;
+    }
+    
+    public String toString() {
+        return message + " (from toString)";
+    }
 
 }


[7/8] struts-examples git commit: removed sessionid from url

Posted by sd...@apache.org.
removed sessionid from url


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/df82ce5a
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/df82ce5a
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/df82ce5a

Branch: refs/heads/master
Commit: df82ce5ae11af3641f5d05e0193fc50cdc9453f7
Parents: 65ebbae
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 23:07:24 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 23:07:24 2017 +0200

----------------------------------------------------------------------
 coding-actions/src/main/webapp/WEB-INF/web.xml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/df82ce5a/coding-actions/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/webapp/WEB-INF/web.xml b/coding-actions/src/main/webapp/WEB-INF/web.xml
index 4241d94..c698d2b 100644
--- a/coding-actions/src/main/webapp/WEB-INF/web.xml
+++ b/coding-actions/src/main/webapp/WEB-INF/web.xml
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 <display-name>Coding Actions</display-name>
-  <welcome-file-list>
-    <welcome-file>index.jsp</welcome-file>
-  </welcome-file-list>
-  
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
   					 
     <filter>
         <filter-name>struts2</filter-name>
@@ -15,5 +14,8 @@
         <filter-name>struts2</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-    
+
+    <session-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
 </web-app>


[4/8] struts-examples git commit: removed unnecessary setter

Posted by sd...@apache.org.
removed unnecessary setter


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/8e09299f
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/8e09299f
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/8e09299f

Branch: refs/heads/master
Commit: 8e09299f253e946eac0c86aec2139b754cc2a9cc
Parents: 60035c0
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 18:01:30 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 18:01:30 2017 +0200

----------------------------------------------------------------------
 .../org/apache/struts/helloworld/action/HelloWorldAction.java    | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/8e09299f/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
index c847cec..ffcf6e2 100644
--- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
+++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
@@ -63,8 +63,4 @@ public class HelloWorldAction extends ActionSupport {
         return messageStore;
     }
 
-    public void setMessageStore(MessageStore messageStore) {
-        this.messageStore = messageStore;
-    }
-
 }


[6/8] struts-examples git commit: added indentation to jsp files

Posted by sd...@apache.org.
added indentation to jsp files


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/65ebbae1
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/65ebbae1
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/65ebbae1

Branch: refs/heads/master
Commit: 65ebbae1e592d3454244dca2df62460a1f266640
Parents: b3715b9
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 18:12:25 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 18:12:25 2017 +0200

----------------------------------------------------------------------
 coding-actions/src/main/webapp/HelloWorld.jsp | 20 +++++-------
 coding-actions/src/main/webapp/index.jsp      | 38 ++++++++++------------
 2 files changed, 25 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/65ebbae1/coding-actions/src/main/webapp/HelloWorld.jsp
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/webapp/HelloWorld.jsp b/coding-actions/src/main/webapp/HelloWorld.jsp
index 4e19ac9..b15b53c 100644
--- a/coding-actions/src/main/webapp/HelloWorld.jsp
+++ b/coding-actions/src/main/webapp/HelloWorld.jsp
@@ -2,19 +2,15 @@
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
 <html>
-<head>
+  <head>
     <meta charset="UTF-8">
     <title>Hello World!</title>
-</head>
-
-<body>
-<h2><s:property value="%{messageStore.message}"/></h2>
-
-<p>I've said hello <s:property value="%{helloCount}"/> times!</p>
-
-<p><s:property value="%{messageStore}"/></p>
-
-<p><a href="<s:url action='index'/>">Home Page</a></p>
-</body>
+  </head>
 
+  <body>
+    <h2><s:property value="%{messageStore.message}"/></h2>
+    <p>I've said hello <s:property value="%{helloCount}"/> times!</p>
+    <p><s:property value="%{messageStore}"/></p>
+    <p><a href="<s:url action='index'/>">Home Page</a></p>
+  </body>
 </html>

http://git-wip-us.apache.org/repos/asf/struts-examples/blob/65ebbae1/coding-actions/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/webapp/index.jsp b/coding-actions/src/main/webapp/index.jsp
index f96ec7f..bc167d4 100644
--- a/coding-actions/src/main/webapp/index.jsp
+++ b/coding-actions/src/main/webapp/index.jsp
@@ -2,29 +2,25 @@
 <%@ taglib prefix="s" uri="/struts-tags" %>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
 <html>
-<head>
+  <head>
     <meta charset="UTF-8">
     <title>Basic Struts 2 Application - Welcome</title>
-</head>
+  </head>
 
-<body>
-<h1>Welcome To Struts 2!</h1>
-
-<p>
-    <a href="<s:url action='hello'/>">Hello World</a>
-</p>
-<s:url action="hello" var="helloLink">
-    <s:param name="userName">Bruce Phillips</s:param>
-</s:url>
-<p><a href="${helloLink}">Hello Bruce Phillips</a></p>
-
-<p>Get your own personal hello by filling out and submitting this form.</p>
-
-<s:form action="hello">
-    <s:textfield name="userName" label="%{'Your name'}"/>
-    <s:submit value="%{'Submit'}"/>
-
-</s:form>
-</body>
+  <body>
+    <h1>Welcome To Struts 2!</h1>
+    <p>
+      <a href="<s:url action='hello'/>">Hello World</a>
+    </p>
+    <s:url action="hello" var="helloLink">
+      <s:param name="userName">Bruce Phillips</s:param>
+    </s:url>
+    <p><a href="${helloLink}">Hello Bruce Phillips</a></p>
 
+    <p>Get your own personal hello by filling out and submitting this form.</p>
+    <s:form action="hello">
+      <s:textfield name="userName" label="%{'Your name'}"/>
+      <s:submit value="%{'Submit'}"/>
+    </s:form>
+  </body>
 </html>


[2/8] struts-examples git commit: removed unnecessary setter

Posted by sd...@apache.org.
removed unnecessary setter


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/c98d0fc3
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/c98d0fc3
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/c98d0fc3

Branch: refs/heads/master
Commit: c98d0fc383a3320ea0f658bcb023787fc64dfc19
Parents: 7f6f7c8
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 17:57:55 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 17:57:55 2017 +0200

----------------------------------------------------------------------
 .../org/apache/struts/helloworld/action/HelloWorldAction.java    | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/c98d0fc3/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
index 95b7408..71eea4b 100644
--- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
+++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
@@ -27,10 +27,6 @@ public class HelloWorldAction extends ActionSupport {
         return helloCount;
     }
 
-    public void setHelloCount(int helloCount) {
-        HelloWorldAction.helloCount = helloCount;
-    }
-    
     private String userName;
 
     public String getUserName() {


[3/8] struts-examples git commit: fixed comment

Posted by sd...@apache.org.
fixed comment


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/60035c0a
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/60035c0a
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/60035c0a

Branch: refs/heads/master
Commit: 60035c0a3089d0c243329120e10a47abddd90d87
Parents: c98d0fc
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 17:59:32 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 17:59:32 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/struts/helloworld/action/HelloWorldAction.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/60035c0a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
index 71eea4b..c847cec 100644
--- a/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
+++ b/coding-actions/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java
@@ -6,7 +6,7 @@ import org.apache.struts.helloworld.model.MessageStore;
 /**
  * Acts as a Struts 2 controller that responds
  * to a user action by setting the value
- * of the Message model class, and returns a String 
+ * of the MessageStore model class, and returns a String 
  * result.
  * @author Bruce Phillips
  *


[5/8] struts-examples git commit: unified indentation

Posted by sd...@apache.org.
unified indentation


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/b3715b9d
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/b3715b9d
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/b3715b9d

Branch: refs/heads/master
Commit: b3715b9dda5511311bf928b916397ac87b624c37
Parents: 8e09299
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 18:07:06 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 18:07:06 2017 +0200

----------------------------------------------------------------------
 coding-actions/src/main/resources/struts.xml | 34 ++++++++++-------------
 1 file changed, 15 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/b3715b9d/coding-actions/src/main/resources/struts.xml
----------------------------------------------------------------------
diff --git a/coding-actions/src/main/resources/struts.xml b/coding-actions/src/main/resources/struts.xml
index fb4c41f..567e274 100644
--- a/coding-actions/src/main/resources/struts.xml
+++ b/coding-actions/src/main/resources/struts.xml
@@ -1,26 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE struts PUBLIC
-		"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
-		"http://struts.apache.org/dtds/struts-2.5.dtd">
+        "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
+        "http://struts.apache.org/dtds/struts-2.5.dtd">
 <struts>
+    <constant name="struts.devMode" value="true" />
 
-	<constant name="struts.devMode" value="true" />
-
-	<package name="basicstruts2" extends="struts-default">
-
+    <package name="basicstruts2" extends="struts-default">
         <!-- If no class attribute is specified the framework will assume success and 
         render the result index.jsp -->
         <!-- If no name value for the result node is specified the success value is the default -->
-		<action name="index">
-			<result>/index.jsp</result>
-		</action>
-		
-		<!-- If the URL is hello.action the call the execute method of class HelloWorldAction.
-		If the result returned by the execute method is success render the HelloWorld.jsp -->
-		<action name="hello" class="org.apache.struts.helloworld.action.HelloWorldAction" method="execute">
-			<result name="success">/HelloWorld.jsp</result>
-		</action>
-
-	</package>
-
-</struts>
\ No newline at end of file
+        <action name="index">
+            <result>/index.jsp</result>
+        </action>
+        
+        <!-- If the URL is hello.action the call the execute method of class HelloWorldAction.
+        If the result returned by the execute method is success render the HelloWorld.jsp -->
+        <action name="hello" class="org.apache.struts.helloworld.action.HelloWorldAction" method="execute">
+            <result name="success">/HelloWorld.jsp</result>
+        </action>
+    </package>
+</struts>


[8/8] struts-examples git commit: changed deprecated artifactId to project.artifactId

Posted by sd...@apache.org.
changed deprecated artifactId to project.artifactId


Project: http://git-wip-us.apache.org/repos/asf/struts-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts-examples/commit/15c545e0
Tree: http://git-wip-us.apache.org/repos/asf/struts-examples/tree/15c545e0
Diff: http://git-wip-us.apache.org/repos/asf/struts-examples/diff/15c545e0

Branch: refs/heads/master
Commit: 15c545e0d197c7650888f3117ab853bfed7bd4fe
Parents: df82ce5
Author: Stefaan Dutry <st...@gmail.com>
Authored: Sun Apr 23 23:47:53 2017 +0200
Committer: Stefaan Dutry <st...@gmail.com>
Committed: Sun Apr 23 23:47:53 2017 +0200

----------------------------------------------------------------------
 coding-actions/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts-examples/blob/15c545e0/coding-actions/pom.xml
----------------------------------------------------------------------
diff --git a/coding-actions/pom.xml b/coding-actions/pom.xml
index 098ce98..c7e027f 100644
--- a/coding-actions/pom.xml
+++ b/coding-actions/pom.xml
@@ -25,7 +25,7 @@
                 <version>8.1.16.v20140903</version>
                 <configuration>
                     <webApp>
-                        <contextPath>/${artifactId}</contextPath>
+                        <contextPath>/${project.artifactId}</contextPath>
                     </webApp>
                     <stopKey>CTRL+C</stopKey>
                     <stopPort>8999</stopPort>