struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: Problem with custom ActionMapping, set-property and WebLogic
Date Mon, 05 Apr 2004 23:41:01 GMT
Try adding matching getters for your setters, to make sure Weblogic sees
these as properties.

--
Martin Cooper


"chris" <chris@gerrard.net> wrote in message
news:20040405231924.84305.qmail@netmail.mail.registeredsite.com...
> I'm having trouble getting a custom ActionMapping class populated with the
> contents of a <set-property ... /> element of a Struts <action ..>
</action>
> declaration.
>
> My code works under Tomcat, but not under Weblogic 8.1.
>
> Can anyone provide any pointers?
>
> Everything's fine, except that the custom properties don't get set.
>
>
> The custom class:
>
> public class MyActionMapping extends ActionMapping {
>   ...
>    public void setUserRequired(String boolStr) {
>        System.out.println("\n.... setUserRequired(" + boolStr + ")");
>        userRequired = getBoolean(userRequired, boolStr);
>    }
>
>    // This is here to show the Mapping getting loaded, and it does
>    public void setInput(String input) {
>        System.out.println("\n.... setInput(" + input + ")");
>        super.setInput(input);
>    }
>    ...
> }
>
>
> The struts-config:
>
>  <action-mappings    type="MyActionMapping">
>    <action   path="..."
>              scope="request"
>              name="FileUploadForm"
>              input="BadData.jsp">
>      <set-property value="false" property="userRequired" />
>    </action>
>    ...
>  </action-mappings>
>
> When my app loads I get this output from WebLogic:
>
>  ---
> .... MyActionMapping.setInput(BadData.jsp)
>
> .... MyActionMapping.setInput(some.login.page)
>  --- 
>
> So the correct ActionMapping class is being used, but the <set-property />
> has no effect.
>
> Thanks,
>
> Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message