Let's suppose I've this simple action defined in struts.xml:

<action name="InitializeSuperuser_*" class="InitializeSuperuserAction"
method="{1}">
   <result>/WEB-INF/pages/initializeSuperuserSuccess.jsp</result>
   <result name="input">/WEB-INF/pages/initializeSuperuser.jsp</result>
</action>

InitializeSuperuserAction class extends ActionSupport (with defined methods
like execute(), doDefault(), etc).

I want to ask you, what to do, if some struts-aware user requests
InitializeSuperuser_doDefault instead of InitializeSuperuser_execute. They
both by default return "success" , but doDefault can be used to bypass
execute() code. 

If I wanted to use ActionSupport (for handling validation, text providing,
etc), would I have to override doDefault() method to return some other
string in every action?

Or what if I didn't want to use execute method or success result name at
all. User can still call it and get result not defined error. 

I don't like exposing action methods in urls like this, but it's true, that
it can significantly reduce amount of xml definitions in configuration
files.


Thank you for your replies.
-- 
View this message in context: 
http://www.nabble.com/-S2--dynamic-method-invocation-issue-tp20591414p20591414.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to