Thanks for replying me. The basic idea is knowing the need for tag libraries.. for which the explanation was given as reusability. Now, coming to specific example I have given: I agree that it should not be a part of logic: library. But, I think one such tag (substring) is useful in some cases. Say I need to populate a 40 * 10 table with two variables in each cell. I will need a object array of size 400 with two parameters in it. ( I can have Hashmap if I have identical keys, but say thats not the case either). Instead I can have 400 String objects sent with some delimeter. I will save lot of object instantiations and substring the ones with two params. What do you think?
Radu Badita <[EMAIL PROTECTED]> wrote: Although the previous two answers are basically correct, I don't think they really contain the response to Peru's initial question. I hope that the "elders" of this list will clarify things a bit for him. :-) I considered that I'd better avoid responding myself to this, as one that sometime ago was asking (myself and others) why should using the or be better than using the equivalent java code - which was also faster for me to do than learning the new tags.... Still... In this specific case, maybe the answer is not writing a whole new custom tag at all. It wouldn't be very efficient anyway, especially if the "parsing" mentioned is done in one or two particular places only. It might show that maybe a model layer does not exist for the application, and maybe the data is directly retrieved from a (probably legacy) database. (Forgive me if I'm wrong.) At least that parsing could be done in the Action that prepares the view, and the data stored in a form that is easier to display. Even if you will still chose to use a custom tag for that, attaching it to the struts standard "logic" taglib wouldn't be a good choice ( if that was what you meant by a tag used as ) Radu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Start your day with Yahoo! - make it your home page