Versions Compared

Key

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

...

Code Block
<p>Username: ${user.username}</p>

A JavaBean object in a standard context in Freemarker, Velocity, or JSTL EL (Not OGNL).

Code Block
<s:textfield name="username"/>

A username property on the Value Stack.

Code Block
<s:url id="es" action="Hello">
  <s:param name="request_locale">
    es
  </s:param>
</s:url>
<s:a href="%{es}">Espanol</s:a>

Another way to refer to a property placed on the Value Stack.

Code Block
<s:property
  value="#session.user.username" />

The username property of the User object in the Session context.

Code Block
<s:select
  label="FooBar" name="foo"
  list="#{'username':'trillian',
    'username':'zaphod'}" />

A static Map, as in put("username","trillian").

Disallowed property names

The following names of property are disallowed:

  • parameters
  • application
  • session
  • struts
  • request
  • servletRequest
  • servletResponse

The below code will not work:

Code Block
xml
xml

<s:iterator value="parameters"/>
Code Block
java
java

public class MyAction {

    private String[] parameters;

    public String[] getParameters() {
        return parameters;
    }

}

Next: JSP