At 5:43 PM +0100 1/6/06, Manfred Wolff wrote:
Hi everybody.

Since Struts 1.3 it is possible to set an arbitary key/value pair to
retrieve at runtime such as:

<action path="/EditSubscription"
        extends="Editor">
        <set-property key="foo" value="bar" />
</action>

In a document from the struts university (author Ted Husted) is an example to retrieve such pair:


public ActionForward execute(
        ActionMapping mapping,
        ActionForm form,
        HttpServletRequest request,
        HttpServletResponse response)
        throws Exception {

        string foo = getProperty("foo");

        // ...

In the nightly builds and in the newest subversion branch (366511) there is no getProperty() method in the Action class. So does anybody know, how to retrieve such a pair von set-properties.

The properties are set on the ActionMapping, not the Action class.

So in this case you'd use

String foo = mapping.getProperty("foo");

Hope this helps
        Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to