i resolved the issue with the following settings in strtus.xml
<constant name="struts.mapper.composite" value="struts,restful2"/>
<constant name="struts.mapper.class" value="composite"/>
<constant name="struts.patternMatcher" value="regex" />
<package name="regex" extends="struts-default">
<action name="/{param1}/Contact/{param2}/" method="index"
class="com.mot.presence.PresenceContactController">
{1}
{2}
</action>
</package>
its working propely with the url
http://localhost/context/param1/Contact/param2
even i tried with multiple params also....i.e
<action name="/{param1}/Contact/{param2}/Members/{param3}" ......
---- Venkatt
Musachy Barroso wrote:
>
> I find that using parameters in urls is confusing in struts, and there
> are just too many (and not compatible) ways of doing it, for example,
> if you want to have parameters in front of the action name, like
>
> /something/param1/param2/ActionName
>
> you would have to use the "namedVariable" action mapper, but then, you
> cannot have parameters after the action name ("ActionName"). If you
> want to have parameters after the action name, then you can use
> wildcards, and do something like:
>
> <package name="edit" extends="struts-default" namespace="/edit">
> <action name="/person/*"
> class="org.apache.struts.webapp.example.EditAction">
> {1}
> <result>/mainMenu.jsp</result>
> </action>
> </package>
>
> And maybe, you can mix them, but I haven't tried that. I find all this
> very confusing and hard to understand. I would like to do this:
>
> class MyAction {
> String param1, param2, param3;
>
> @Action("/{param1}/{param2}/MyAction/{param3}")
> public void execute() {....}
> }
>
> and the framework should figure out the rest for me. I don't think
> this would be that hard to implement and should provide an unified way
> of handling these type of urls. Thoughts?
>
> musachy
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/parameters-in-url-tp25602877p29717576.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]