Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titlecom.example.actions.HelloWorld
borderStylesolid
package com.example.actions;

import com.opensymphony.xwork2.ActionSupport; 
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;

@ParentPackage("customXWorkPackage")
public class HelloWorld extends ActionSupport {
  public String execute() {
    return SUCCESS;
  }
}

Configuration reference

Add a constant element to your struts config file to change the value of a configuration setting, like:

Code Block
xml
xml

<constant name="struts.convention.result.path" value="/WEB-INF/mytemplates/"/>