No, it's not.  Poor typing on my part 8-)

I've worked around my problem by getting the name (.getName()) and doing a
String comparison.  Not real pretty, but it works.  I'd rather check to see
if it is an instance of DispatchAction rather than checking to see if it is
'org.apache.struts.actions.DispatchAction'.....

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

[EMAIL PROTECTED]


> -----Original Message-----
> From: Michael Ruppin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 14, 2003 3:01 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Determining Class Type of Action
> 
> 
> Is this a cut & paste of the code?  You're missing a
> closing paren in your if statement.
> 
> m
> 
> --- Jerry Jalenak <[EMAIL PROTECTED]> wrote:
> > I am extracting the class type from an Action:
> > 
> >     Class c = Class.forName(mapping.getType());
> > 
> > I can then 'chase' the class chain backwards:
> >     
> >     boolean isDispatchAction = false;
> >     while(!isDispatchAction)
> >     {
> >             c = c.getSuperClass();
> >             if
> >
> (c.isInstance(org.apache.struts.actions.DispatchAction)
> >             {
> >                     isDispatchAction = true;
> >             }
> >     }
> > 
> > The 'if' statement comparison is never true.  I've
> > printed out the value of
> > 'c' on each iteration through the loop, and can see
> > when it is
> > 'org.apache.struts.actions.DispatchAction', but my
> > isDispatchAction boolean
> > never gets set to true.
> > 
> > What's the right way to do this?
> > 
> > Thanks!
> > 
> > 
> > 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]
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [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]

Reply via email to