Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

Description

Error formatting macro: snippet: java.lang.NullPointerException

Parameters can be passed to the action using nested param tags.

Placement in context

The action will not be published to the context until the whole tag is evaluated, meaning that inside the body of the tag, the action cannot be accessed, For example:

<s:action var="myAction" name="MyAction" namespace="/">
    Is "myAction" null inside the tag? <s:property value="#myAction == null" />
</s:action>
    Is "myAction" null outside the tag? <s:property value="#myAction == null" />

Will print:
Is "myAction" null inside the tag? true
Is "myAction" null outside the tag? false

Parameters

Error formatting macro: snippet: java.lang.NullPointerException

Examples

Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
  • No labels

1 Comment

  1. Another example:

    <div>This will call the execute Method of /test/test.action</div>
    <s:action id="myAction" name="test" namespace="/test" flush="false" executeResult="false" />
    <div>If the test action has a getPropValue() method the result can be used</div>
    <s:property value="#myAction.propValue" />