-----Messaggio originale-----
Da: Troy Bull [mailto:[EMAIL PROTECTED]
Inviato: martedì 18 ottobre 2005 14.35
A: user@struts.apache.org
Oggetto: trouble with dispatching on a paramter


Hello

I am trying to get my form to dispatch to different functions inside my 
action handler class.  I followed this tip exactly : 
http://www.husted.com/struts/tips/002.html (except i fixed a couple type 
o's).

The problem is my dispatch parameter is not being recognized.  I have 
the following code in my ActionForward execute method:

   SearchForm s = (SearchForm) form;
   String dispatchString = (String) request.getAttribute("dispatch");
   System.out.println("this is execute");
   System.out.println(dispatchString);
   System.out.println(s.getDispatch());

and it prints out the following

05/10/18 07:30:28 this is execute
05/10/18 07:30:28 null
05/10/18 07:30:28 run_main_search


what I want is the method run_main_search to execute instead.
My strut-config contains the following action mapping:

<action path="/doSearch" name="SearchForm" 
type="bum.model.DoSearchAction" unknown="false" parameter="dispatch">
     <forward name="gms" path="/debug.jsp"/>
   </action>

Any ideas?

Thanks in advance

troy

unknown
protected boolean unknown
Indicates Action be configured as the default one for this module, when true


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

Reply via email to