If the reason to use a tag in this example is because it looks like it belongs, and its not actual Java code, than I'm fine with it. I have nothing against tags. All I'm pointing out is that if you are trying to avoid logic in your JSPs (like in the example given), you are not accomplishing it.
ranko -----Original Message----- From: Martin Naskovski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 3:42 AM To: Ranko Bijelonic Cc: Struts Users Mailing List Subject: Re[4]: Ranko like question: What is the sense of some of these tags libs? Then, if they're so alike as you claim, use the JSTL conditional tags. Or are you just playing devil's advocate by using scriptlets anyway because you 'feel' they're ok if used in a certain manner? You either do stuff a certain way, or you don't do it at all. Breaking a certain paradigm because it suits you or you think it's ok in certain cases should only be warranted under dire circumstances, and should be an exception rather than a rule. You seem to make it a rule. And that, my friend, is wrong. Try harder next time. :) Your JSP will look nicer w/out scriptlets. Put java code where it belongs - in Java files, not in JSPs. Martin Thursday, July 24, 2003, 12:33:26 AM, you wrote: RB> In the example below, there isn't much difference between the scriplet and RB> the tag. Both of them are conditionals checking if index is an even number. RB> That fact that one is a scriptlet and the other is a tag is only a matter of RB> 'syntax' to me. Logically, the developer is doing the same thing there. We RB> can pretend like we are not scripting there since we are using the tag, but RB> I can pretend I'm dating Angelina Jolie when I'm really....not. That said, RB> I think there is nothing wrong with having display logic (in tag or RB> scriptlet form) in the JSPs. Lets say your requirements are to display a RB> list of entries with every odd entry in blue and even in red. I cannot RB> think of a better way to do this than with a conditional in the view. RB> ranko RB> -----Original Message----- RB> From: Martin Naskovski [mailto:[EMAIL PROTECTED] RB> Sent: Thursday, July 24, 2003 3:12 AM RB> To: Ranko Bijelonic RB> Cc: Struts Users Mailing List RB> Subject: Re[2]: Ranko like question: What is the sense of some of these RB> tags libs? RB> JSTL+the struts tags and/or struts-el, for me has completely RB> eliminated the need to use scriptlets. Using scriptlets invites the RB> use of business logic in your view (at least, for less experienced RB> programmers). This, IMHO, is a major violation of the MVC paradigm, RB> and programmers doing that should be shot. RB> This is why you should stay clear of scriptlets, no if's and's or RB> but's. If you design your code correctly, you should be able to live RB> w/out scriptlets. RB> Wednesday, July 23, 2003, 5:37:26 PM, you wrote: RB>> yeah, i don't use tags :). But, it looks like one does not have to RB> worry RB>> about matching curly braces when using the tag code :). Seriously RB> though, RB>> most of the scriplets in my JSPs are minimal, and are just as easy (to RB> me as RB>> a Java programer though) as the tags. HTML coders would probably RB> prefer to RB>> learn this tag language rather than the subset of the Java language they RB>> would need. I'm sure there are other tag uses where the usage is more RB>> tag-like. RB>> While we are at it, can I bag on a particual type of an EJB or would RB> that be RB>> too much for now? :). RB>> ranko RB>> -----Original Message----- RB>> From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] RB>> Sent: Wednesday, July 23, 2003 10:09 AM RB>> To: [EMAIL PROTECTED] RB>> Subject: Ranko like question: What is the sense of some of these tags RB>> libs? RB>> As Ranko asked, about the redundancy of Struts I would like to know that RB> the RB>> heck is the deal with SOME of these tag libs out there? RB>> I mean, look at this: <c:if test="${index%2==0}"> and look at this: <% RB>> if(index.intValue()%2==0){ %> RB>> I like NOT to use Java scriptlets in my JSPs and I am pretty decent at RB>> achieving that but RB>> if my only resolve of using a "tag" is to have it look like CODE and not RB> a RB>> true tag why RB>> have people (code maintainers and the original coder in the first place) RB>> learn a new "language" RB>> and just use a scriptlet? RB>> Seeing $var like tag code that makes me think this is some sort of RB>> conspiracy so that all the RB>> UNIX admins, with their UNIX scripts, who needed new jobs, since WinTel RB> is RB>> taking over, starting RB>> writing "tag" libraries. RB>> I mean really, what is the deal with these so called "tags" that aren't RB>> tags? RB>> JavaScript was cool when it came out (and wasn't developed by Sun) RB> because RB>> if you knew Java then RB>> you were about 90% there to being a great JavaScripter. RB>> So I say Ranko, are you just as bewildered at this as I am? RB>> :-) RB>> --------------------------------------------------------------------- RB>> To unsubscribe, e-mail: [EMAIL PROTECTED] RB>> For additional commands, e-mail: [EMAIL PROTECTED] RB> -- RB> --------------------------------------------------------------------- RB> To unsubscribe, e-mail: [EMAIL PROTECTED] RB> For additional commands, e-mail: [EMAIL PROTECTED] RB> --------------------------------------------------------------------- RB> To unsubscribe, e-mail: [EMAIL PROTECTED] RB> For additional commands, e-mail: [EMAIL PROTECTED] -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]