On Sun, 29 Dec 2002, Lirian Ostrovica wrote:

> Hi,
>
> I need to access an Action instance (I have its class name) while
> writting a Tag.
>
> I have seen that ActionServlet stores Action instances in a 'protected'
> variable (FastHashMap), and so far the only way I can see, is to extend
> ActionServlet and write my own 'public' method to do the job.
> But of course I do not prefer to extend ActionServlet just for that...

Even if you know the class name, there is no guarantee that an instance of
that Action exists, since Action instances are created as needed. And even
if an instance does exist, what would be the purpose of accessing it? An
Action instance should not maintain state, since that will cause threading
problems, and if you need to access class data, then you do not need an
instance.

Perhaps if you tell us what you are trying to achieve, we can help you
find the right way to do that.

--
Martin Cooper


>
> If there is any other way, can someone please let me know
>
> thanks a lot
>
> lirian
>
>
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to