struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Lee" <brian_a_...@hotmail.com>
Subject Re: NEWBIE: [CLOSED] difficulties getting simple no bean page working...
Date Thu, 12 Feb 2004 20:42:38 GMT
That compiles because you just overloaded the execute method. Upon 
execution, the base Action's execute would run and nothing would call your 
execute.

BAL

>From: Timothy Stone <citylists@petmystone.com>
>To: Struts Users Mailing List <struts-user@jakarta.apache.org>
>Subject: Re: NEWBIE: [CLOSED] difficulties getting simple no bean page 
>working...
>
>List,
>
>Too close and too embarrassed to say what it was. Okay, I'll say...
>
>Timothy Stone wrote:
>
>>List,
>>
>>I'm a Struts newbie with a lot of general hours in Tomcat. I want to 
>>advance my development with Struts 1.1 and Model 2.
>
>...snip...
>
>>Step 3. Create the Action subclass
>>
>>package webAppDev;
>>
>>import javax.servlet.http.*;
>>import org.apache.struts.action.*;
>>
>>public class SearchAction1 extends Action {
>>     public ActionForward execute( ActionMapping mapping, Action form,
>>                                   HttpServletRequest request,
>>                                   HttpServletResponse response )
>>     throws Exception {
>>         return( mapping.findForward( "success" ) );
>>     }
>>}
>>
>
>Can you see it? I incorrectly pass an Action object where Action#execute 
>expects an ActionForm! Typo Grande. Where I say "Action form", I meant to 
>type "ActionForm form".
>
>Now explain how that compiles? Action is not a subclass of ActionForm.
>
>...snip...
>
>Many thanks,
>Tim
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>

_________________________________________________________________
Click here for a FREE online computer virus scan from McAfee. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message