On Thu, Jun 4, 2009 at 12:47 PM, Jim Collings <jlistn...@gmail.com> wrote:
[...]
>>
>> <constant name="struts.convention.default.parent.package" value="something" 
>> />
>>
[...]
> OK, well it should have been:
>
> <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="something" extends="struts-default">
>        <default-interceptor-ref name="paramsPrepareParamsStack"/>
> </package>
>
> In any case, it is not this type of mapping problem because the
> Prepare method is getting called just fine. The parameters are passed
> in a link though and the property that the Prepare method requires is
> not being set. I can't find any reason why it wouldn't be but tracing
> through shows that params is not being called before Prepare.
>
>

The configuration constant I pointed to still isn't in there.

In the default stack, the params interceptor does not run before the
prepare interceptor. For instances where you need the params set
first, then the prepare interceptor fires afterwards, we created the
paramsPrepareParamsStack. Now, you have the paramsPrepareParamsStack
set as the default stack for the "something" package, but my point is
that if you are using conventions, your actions are probably not a
part of the "something" package. They are a part of the
"conventions-default" package. You can move all of the actions in your
app into the "something" package with the configuration constant I
have pasted above, or you can move a single action into the
"something" package using the @ParentPackage annotation (reference in
the link I sent earlier).

-Wes


-- 
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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to