struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Stone <cityli...@petmystone.com>
Subject Re: NEWBIE: [CLOSED] difficulties getting simple no bean page working...
Date Thu, 12 Feb 2004 19:26:11 GMT
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


Mime
View raw message