struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Params not getting set
Date Thu, 04 Jun 2009 15:34:20 GMT
I'm assuming you are using the conventions plugin (since there is no
action definition). How are you making sure your
conventions-configured actions are in the "stuff" package? If this is
your configuration, in whole, then you need to add -

<constant name="struts.convention.default.parent.package" value="stuff" />

Just matching up namespace is not enough.

Another option is to use the @ParentPackage annotation on the action class -
http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-ParentPackageannotation

-Wes

On Thu, Jun 4, 2009 at 11:24 AM, Jim Collings <jlistnews@gmail.com> wrote:
> So I have a Preparable action and in the Preparable method, I need
> access to a parameter. Others have gone over my struts.xml and seem to
> think that it is correct:
>
> <struts>
>    <constant name="struts.devMode" value="true"/>
>    <constant name="struts.configuration.xml.reload" value="true"/>
>    <constant name="struts.custom.i18n.resources" value="globalMessages"/>
>    <constant name="struts.convention.action.packages"
> value="com.stuff.something.web"/>
>    <package name="stuff" extends="struts-default">
>    <default-interceptor-ref name="paramsPrepareParamsStack"/>
> </package>
>
> I have a getter and a setter for the property but it is not being set.
> It is being called from a link like so:
>
> http://localhost:30000/someproject-web/admin/person-change?ldapUidSelected=SOMEUSER
>
> So... any ideas why the ldapUidSelected  property is not being set  in
> the PersonChangeAction class prior to calling Prepare() ?
>
>
> Jim C.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


Mime
View raw message