RE: [Actionframework-users] Report: parameters and action's definition order
Status: Inactive
Brought to you by:
ptoman
From: Petr T. <Pet...@pi...> - 2003-07-24 05:40:11
|
> I also noticed that URL params are sometimes evaluated incorrectly. > I think the best way would be to make argument evaluation "greedy" - match > as many params as possible. Please let me know if the fix below applies to your case. >> I have noticed when you've a same action name with different number of >> parameters the definition order is important. >> Example: >> 1. <action name="/entrada/" method="getRandomQuiz()"> >> 2. <action name="/entrada/$section" method="getRandomQuiz(String >> section)"> >> 3. <action name="/entrada/$section/$name" method="getQuiz(String >> section, String name)"> >> >> When you have "123 order" written all is right. But with "312 >> order" if you ask for '/entrada/section/name', ActionServlet >> invoke the second method as "/entrada/$section" action. There seems to be a bug in ActionRuntime.parseUrlParams(). Replace line 1307 (AS 0.94.2): newAction.append("/.+"); with newAction.append("/[^/]+"); and rebuild lib/ActionServlet.jar by running "ant" from AS directory. -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |