diff --git a/helloworld/pom.xml b/helloworld/pom.xml index b304d550..a7fb8da2 100644 --- a/helloworld/pom.xml +++ b/helloworld/pom.xml @@ -25,7 +25,7 @@ 8.1.16.v20140903 - /${artifactId} + /${project.artifactId} CTRL+C 8999 diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java index b96dbdaf..d098c073 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/action/HelloWorldAction.java @@ -14,35 +14,29 @@ */ 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; - - /* - * Creates the MessageStore model object 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() ; - return SUCCESS; - } - - public MessageStore getMessageStore() { - return messageStore; - } - - public void setMessageStore(MessageStore messageStore) { - this.messageStore = messageStore; - } - - + private static final long serialVersionUID = 1L; + + /** + * The model class that stores the message + * to display in the view. + */ + private MessageStore messageStore; + + /* + * Creates the MessageStore model object and + * returns success. The MessageStore model + * object will be available to the view. + * (non-Javadoc) + * @see com.opensymphony.xwork2.ActionSupport#execute() + */ + public String execute() { + messageStore = new MessageStore() ; + + return SUCCESS; + } + + public MessageStore getMessageStore() { + return messageStore; + } } diff --git a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java index 03d87d33..e52fa89e 100755 --- a/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java +++ b/helloworld/src/main/java/org/apache/struts/helloworld/model/MessageStore.java @@ -6,20 +6,15 @@ * */ public class MessageStore { - - private String message; - - public MessageStore() { - - setMessage("Hello Struts User"); - } + + private String message; + + public MessageStore() { + message = "Hello Struts User"; + } - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } + public String getMessage() { + return message; + } } diff --git a/helloworld/src/main/webapp/HelloWorld.jsp b/helloworld/src/main/webapp/HelloWorld.jsp index f795612d..db8e040e 100755 --- a/helloworld/src/main/webapp/HelloWorld.jsp +++ b/helloworld/src/main/webapp/HelloWorld.jsp @@ -1,13 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> - - - -Hello World! - - -

- - \ No newline at end of file + + + Hello World! + + +

+ + diff --git a/helloworld/src/main/webapp/index.jsp b/helloworld/src/main/webapp/index.jsp index 6dc1e780..de471eda 100755 --- a/helloworld/src/main/webapp/index.jsp +++ b/helloworld/src/main/webapp/index.jsp @@ -1,14 +1,13 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> - - - -Basic Struts 2 Application - Welcome - - -

Welcome To Struts 2!

-

Hello World

- - \ No newline at end of file + + + Basic Struts 2 Application - Welcome + + +

Welcome To Struts 2!

+

Hello World

+ +