Like I said, it ought to be so obvious.....

That was the whole problem.  Here I'm expecting Struts to pass in my
subclassed ActionMapping class (since I specified that on the className
parameter), never thinking that Struts would instead pass in the base class
and then I'd have to cast it over to my subclass.  Doh!  

Thanks!

Jerry Jalenak
Team Lead, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

[EMAIL PROTECTED]


-----Original Message-----
From: José Ventura [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 1:24 PM
To: Struts Users Mailing List
Subject: Re: Subclassing ActionMapping


I'm just guessing here, but have you tried using the
first signature (using the "normal" ActionMapping) and
then casting it inside your action to "myActionMapping"?

HTH
- v

----- Original Message -----
From: "Jerry Jalenak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 09, 2003 3:18 PM
Subject: Subclassing ActionMapping


> This should be so stinkin' obvious that I ought to be seeing it, but after
> spending all morning trying to figure this out, I hope someone can shed
some
> light for me.  I've subclassed ActionMapping so I can include a couple of
> <set-property> tags in my Actions.  This seems to work OK as I can see the
> 'setters' being called when the web app initializes.  The question I have
is
> this - which class do I specify for my execute action?  Do I use the
> standard method signature of
>
> public ActionForward execute(ActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> or do I use my subclass?
>
> public ActionForward execute(myActionMapping am, ActionForm af,
> HttpServletRequest req, HttpServletResponse res)
>
> I've tried both.  When I use the normal signature, I can't see my custom
> attributes.  If I specify my subclassed ActionMapping class
> (myActionMapping), nothing seems to work (i.e. can't forward to anything,
> action never actually gets invoked).  In my struts-config I specify my
> subclassed ActionMapping class using the className attribute on the
<action>
> tag.
>
> Arrgh.  This shouldn't be this tough, but I just can't see it.
>
>
> Jerry Jalenak
> Team Lead, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
>
> [EMAIL PROTECTED]
>
>
> This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at the following email address:
[EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



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

Reply via email to