Mihai Scripca wrote:
approach 1
defining 2 actions in struts like this:
a /view/CerereActEdit.do -> X.class
b /edit/CerereActEdit.do   -> X.class (same class)
c /CerereActEdit.do -> X.class (same class)

but it seems that struts, whatever action i ran it always uses c mapping!

This is because of confusion between the action name/namespace.

Simplest solution:  set struts.enable.SlashesInActionNames to true.

Without that, it's looking for a "view" namespace, or an "edit" namespace (and presumably failing to find either).

i think that the behaviour of struts should be improved to keep track of the context (not losing it on the way)
and to switch to context only when requested!

Remember, the browser thinks this is just a web page, so if you serve a form with a relative action path from the url /app/view/abc.do, it's going to submit it as /app/view/newFormAction.do, independent of the framework running on the server. Really this means absolute urls should be used almost exclusively (meaning starting with / -- the machine should probably be left out).

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to