First, simplify the problem. Right now, the code seems to be calling an alternative method, setup. What happens if you try the same thing with the default execute method?
If your application is based on the blank application, it may turned the "!" syntax off, since it can conflict with using wildcards. To use the Check the struts.properties file for the line "struts.enable.DynamicMethodInvocation", and set it to true. We're working on some new code for Struts 2 that will extend the "!" syntax so that it can happily coexist with wildcards. -Ted. On 11/23/06, Tarek Nabil <[EMAIL PROTECTED]> wrote:
Hi, I'm experimenting with Struts 2, and I'm facing a problem with request parameters being populated on the Action. I checked out the source to make sure that the behavior I expect is the correct one, and judging by the source, it is, but it's not happening. I have an action that has a method public void setType(Integer type) { // some code } I declared the action in Struts.xml as follows <action name="dod1" method="setup" class="somePackageName.someClassName"> <result name="page">/jsp/someFolder/someJSP.jsp</result> <result name="input" type="chain">dod1!setup</result> </action> In the setup method, I put the following line logger.debug(getContext().getParameters()); In the URL, I call the following http://server/application/namespace/dod1!setup.action?type=1 The result is that the parameters map is logged as {} and in my method when I attempt to access the type field, I find it to be null! Could someone please point me to what could be wrong? Thanks, Tarek Nabil
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]