RE: JSTL and Struts tags problem...
What do you mean by doesn't work? Do you get error messages? What does the generated html look like? Does fmt:message work on it's own? Does using bean:message instead of fmt:message make any difference? Paul -Original Message- From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] Sent: 27 November 2003 09:21 To: Struts Users Mailing List Subject: JSTL and Struts tags problem... Hello everybody, Any idea why the following shouldn't work: html:submit property=act -- struts taglib fmt:message key=search.generic.reset/ -- jstl taglib /html:submit I also tried to replace the middle line with fmt:message key=${search.generic.reset}/. I also have configured the web.xml to load the properties file for jstl to use with the following code: context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/pa ram-name param-valueApplicationResources/param-value /context-param Thanks a lot in advance, Todor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and Struts tag nesting?
You can use the struts-el taglib in the contrib directory. That allows you to use EL in the Struts tags. David --- Denis @ Betterway [EMAIL PROTECTED] wrote: Hey everyone, I have a problem where I want to use a map backed form and I basically want to do this: c:forEach items=${pDesc} var=prop tr bgcolor=#CC td align=left class=normal width=101 c:out value=${prop.key}/ /td td class=normal width=149 html:text property=property(c:out value=${prop.key}/) / /td /tr /c:forEach I can't nest tags like that though, so is there another way to do this? Thanks, Denis - 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]
RE: JSTL ot struts taglibs?
I guess if you just don't like JSTL (the ambiguity, lack of developmental feedback, lack of refactoring support, etc) you are SOL. Edgar -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:32 PM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. Don't be so sure. Because the JSTL is standard, containers can optimize the java code generated from JSTL tags. This means a c:if tag can be converted into a real Java if statement instead of creating tag instances and invoking the tag's lifecyle. My understanding is that the Jasper JSP compiler (comes with Tomcat) actually generates faster Java code if you *don't* use scriptlets at all. Resin and Tomcat both optimize JSTL tag usage. So, with the JSTL we get the best of both worlds: Fast page rendering and standardized, powerful and easy to use markup tags. David __ 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]
RE: JSTL ot struts taglibs?
You're right, ant does have $var in it I use my IDE to build and forgot. I just think that is a step backwards doing tags that way. So many things are a step backwards like config files for instance. J2EE is supposed to be for the Enterprise which means there is at least a DB and maybe the LDAP at your disposal yet people go back to storing stuff in files. I am just trying to point out when things seem backwards. Certain things (like tags) should be getting more XML like and not more UNIX script like. Let's put our config in a datastore and let's either have programmers doing the UI and accept things like scriptlets or have UI specialist and make it easier on them but not having $var in the tags. That's all I am saying. I definitely was wrong about Ant, sorry. -Original Message- From: Stephen Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:41 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Maybe you could post this to the ECS users group. Scriptlets are fine, but tend to lend themselves to having lots of lines of code in a page that doesn't actually generate html, which is tough to read if you are trying to lay things out. Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What are you talking about? ${var} is pretty standard in Ant. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - 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]
Re: JSTL and Struts-el
Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? Seems to me the only folks who are saying this is easier lean more toward the programming end of the spectrum than formatting folks. Um the burden of using expert groups. On Sunday, August 10, 2003, at 05:34 PM, David Graham wrote: --- Marco Tedone [EMAIL PROTECTED] wrote: Hi everyone, it's quite a long time that I am not monitoring the struts-user list any more...Last time was about three months ago. One of my project's new entry asked me why don't we use JSTL and Struts-el instead of taglibs and Struts tags...Well, last time I posted on this list I asked Craig if the time was mature for JSTL and I've been suggested that it would be better to wait as JSTL were in their beta-release. Two questions: 1) Is now the time to use JSTL? Could we continue to use Struts tags without for it loosing in performance? Yes, JSTL is now finalized and you can/should use it in your apps. The JSTL tags will perform much faster than Struts' tags because containers can optimize the generated code for JSTL. You'll also gain improved development performance as the JSTL tags are more powerful and easier to use. 2) WHAT IS IT Strus-el? Struts-EL is a Struts taglib that allows you to use powerful JSTL Expression Language (EL) statements for the attribute values. David Thank you for any reply, Marco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: JSTL ot struts taglibs?
I agree that *business* logic shouldn't be in the view, but what about formatting logic that is specific to web pages? As an example, let's say that you had the following html code to do tabbed menus: [borrowed from http://www.clagnut.com/writings/csstabs/] div id=topnav ul lia href=#Home/a/li lia href=# class=hereAbout/a/li lia href=#News/a/li /ul /div Would you consider the following to be bad? div id=topnav ul li c:forEach items=${menu.customizedMenuItems} var=perms c:choose c:when test='${perms.currentItem eq Y}' a href=c:out value='${perms.link}'/ class=here c:out value='${perms.description}'/ /a /c:when c:otherwise a href=c:out value='${perms.link}'/ c:out value='${perms.description}'/ /a /c:otherwise /c:choose /c:forEach /li /ul Original Message Subject: [OT] RE: JSTL ot struts taglibs? Date: Fri, 8 Aug 2003 13:47:02 -0400 From: Bailey, Shane C. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.struts.user [snip] In theory it seems like there should be no logic in the View since 1. who sees what and when could be considered business logic and 2. you would want to try and make that who sees what where logic exist in a place where both your Web app and Swing app (for instance) can get to it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
But, what I really meant about JSTL being replaced was in popularity. JSP tags are being replaced (in popularity) with Struts tags, your JSTL, and alike. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 4:02 PM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? Bailey, Shane C. wrote: [Snip] Why should build files be composed of tags at all? I think Ant is great too (a lot better than make), but does the fact that it is tag-based have anything to do with it? No. The reason that the original author went with XML for the structure of Ant build files had nothing to do with tags -- it had to do with hierarchy. See http://tinyurl.com/jg0d to read his thoughts on the matter (sorry for the cachelink but I can't find the official permalink). [/Snip] I don't know why a build file should be composed of tags either. My point was that Ant is nicer and more recently popular than make and the developer could have thought, You know, most people that will be using Any will probably know make so I am going to throw a bunch of == in there and that would be fine. Ant has more of an excuse to have == in the darn thing than a View (geared toward UI and graphic artist specialist) tag set does. And the Ant developer must have seen the light. (All my opinion, of course). [Snip] Faster? Given a programmer with equal knowledge of scriptlets and JSTL, scriptlets are definitely not faster for development. Since when are they faster for performance? Plus they tend to be difficult to read -- and I say this as a former PHP programmer. [/Snip] If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. I know more Java programmers that could get a JSP page drawn if you simple told them % ... % for multiple code segments and do %= ... % to return an expression given all they knew was Java and no Web stuff (including JSTL at all). [Snip] Okay, first of all, JSTL is a JCP specification (JSR-52, for more info see http://jcp.org/aboutJava/communityprocess/final/jsr052/). It's not just some 3rd-party library that is going to be replaced any time soon. Second of all, it is actually a part of the JSP 2.0 specification (just as scriptlets are part of an earlier JSP specification). While scriptlets are still supported in JSP 2.0, it is clear that Sun and the JCP are trying to provide alternatives to scriptlets and at some point they might even be deprecated. [/Snip] Nothing is impossible. I remember being devastated after getting pretty efficient with AWT and then the model changed and then Swing came out. And you even mention how scriptlets WERE part of the spec and are now close to deprecation. So what is so ridiculous about my statement??? [Snip] So sorry, but I had to ask - what the crap were you talking about. [/Snip] No problem. - 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]
RE: [OT] RE: JSTL ot struts taglibs?
You are not alone is questioning the solutions to the view problem. This is an interesting problem and will really challenge the open source community to solve it. Right now, everyone has an opinion, no one has a real solution, each individual users needs are limited (they tend to solve their particular needs and move on) and the problem is EXCEPTIONALLY complex. Part of the problem is that there are so many ways (none of which are particularly good compared to .NET) to paint pages in Java land. JSF is vapor and has a limited window of opportunity and requires REAL industry support to succeed before the world moves past it. .NET view technology looks really tempting from the outside and there are statistics which support that it enhances developer productivity (this will have a greater importance as time passes). The individual with the most influence in the space is Craig, which is why JSF is seen as an overall solution. Unfortunately, many in the community disagree with him and with JSF. I wish, I agreed that JSF was the answer and that if we all jumped on the JSF bandwagon, the industry could move past this problem, we could have great IDE's for view creation, etc. Anyway, this is a real challenge facing the community with very strong pressure being applied by MS. Edgar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
I see the ease of using a flat file for config since a framework doesn't have to support the many DBs where their data could be stored but I think you can better protect data in a DB and you won't have parsing errors at run time. You just need an interface to manipulate the data. Until Struts broke down into modules you had to view, in some cases, a very big and sometimes ugly config file. Didn't Oracle have a product that was like the file system is in the DB? Whatever happened to that? It is Friday and I feel like talking about the future of software a little that's all. :) -Original Message- From: Reinhard [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:04 PM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? So many things are a step backwards like config files for instance. J2EE is supposed to be for the Enterprise which means there is at least a DB and maybe the LDAP at your disposal yet people go back to storing stuff in files. I don't agree. You have to think about the time after the rollout - so, things which are not subject of change, IMHO are ok in config files. All other stuff it's already possible, read from database. So I can see no step backward. cheers Reinhard - 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]
Re: JSTL and Struts-el
On Sun, 10 Aug 2003, Marco Tedone wrote: Where's the java code here? How could it be done with less effort by means of JSTL and Struts-el? One aspect that hasn't been touched on in this thread (completely aside from readability, which tends to be a subjective judgement call) is the fact that the page author does not need to know as much about the data structures being provided by the application's business logic. (A subset of the same benefit accrues when you use Struts tags, but the expression language syntax is not quite as powerful.) Consider the following scriptlet: %= customer.getName() % It's pretty clear that customer must be some bean (not shown here is the ugliness of getting customer defined as a local variable so that this can actually work). But the key takeaway is that it's clearly a bean property being displayed. If the application developer changes his or her mind about the data representation (say, making customer a Map instead of a bean), the page author is forced to accomodate that change. Now consider a corresponding EL expression (which in a JSP 2.0 container can be used directly in your template text, since EL expressions are allowed everywhere): ${customer.name} Note that this works for a JavaBean, as before. But it also works if customer is really a Map -- in that case it turns into the equivalent of: %= customer.get(name) % instead. Separation of concerns about data representation is very powerful. Note that if you're in a pre-JSP-2.0 container, or you want to use Struts tags instead, you have to go to a little more work: c:out var=${customer.name}/ bean:write name=customer property=name/ but you gain the same benefit of insulation from whether customer is a bean or a Map. In this use case, the Struts and EL versions have essentially equivalent power. EL expressions show their improved value, though, when: * You need more complicated expressions than Struts tags support: ${customer.address[customer.preferredAddress].street[2]} * Your page compiler generates optimized code for the EL expression (Resin and others do this already for JSTL tags), whereas a Struts tag is always going to generate the standard custom tag stuff. In such a container, the performance of the EL variant will be better even if the functionality is equivalent. I would be really interested in it. Appearance to the page author is only one aspect of deciding which approach to take. Marco Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: JSTL ot struts taglibs?
There is a pretty good article in the May issue of JDJ by Murali Kauninya and Jamiel Sheikh entitled JavaServer Faces. See: http://www.javadevelopersjournal.com -- JDJ -- archives -- Volume 8, Issue 5 (access code = jdj). Mark -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:24 PM To: 'Struts Users Mailing List' Subject: RE: [OT] RE: JSTL ot struts taglibs? Just like you never said JSF will replace JSTL I never said I was going to eat a bunny. ;) -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:05 PM To: 'Struts Users Mailing List' Subject: RE: [OT] RE: JSTL ot struts taglibs? It is nice to follow the heard sometimes but other times you just have to step back and say, Can't we do any better?. I am not THAT closed minded if I am convinced that the only real way to write tags to do what JSTL does is to do it the current way then I will gladly use them I just think if there is a better way then we should be about to talk about it. The Big 3 car execs didn't want to talk about the future of the industry and what was more user friendly and now look how they are paying. I'm not mad. Just not convinced. BTW, how could you eat those poor defenseless bunnies :) -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:07 PM To: 'Struts Users Mailing List' Subject: [OT] RE: JSTL ot struts taglibs? Everyone take a deep breath and think of bunny rabbits. Cute little bunnies ()() ('.') ()() Hmm.. I'm getting hungry now. -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:50 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What
Re: JSTL and Struts-el
Marco thanks for clearing that up for me.. so have you written some example pages and asked folks what's going on in them then? or by easier you mean you can hack pages together easier? ask someone else to read your pages, think of some questions before you do. Or might they not be bright enough to have insight into any ingenious moments? Don't take my word for it try it out.. although i've only tried 5 people the effect appears quite robust. i'm very happy that having something like shell script in your html pages works for you. Please explain exactly how is it easier? Easier to do what? The only thing it looks easier for is doing stuff that IMO should be done elsewhere.. Help me , put me out of my misery, i don't like debating on this subject but I really think the JSTL is easier premiss is a myth.. and saying oh no it isn't just doesn't convince me. Cheers Mark On Sunday, August 10, 2003, at 08:05 PM, Marco Tedone wrote: Well, I am completely new to the subject, but when I'll put it in action (not to use someone else's words here :)) and if I'll decide that this is better than my current architecture, I'll write to you and say...Hey Mark, JSTL and Struts-el it's easier than Struts taglibs!!! Cheerse, Marco - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 7:17 PM Subject: Re: JSTL and Struts-el All this came up a few weeks ago, so I made a couple of JSP's and asked some folks who're good HTML'ist's to tell me what they thought was going on in the pages. I didn't ask any experts but some folks who use this stuff. Oh .. and guess what I found? The out of the 5 people I've asked so far in my little study that out of 5 examples I made all 5 of them described more accurately what was going on using struts tags than with JSLT. Criticisms of my little pilot include: The examples given kept a lot of the code in action servlets and in some situations using JSLT some teams might choose not to do this; Ecological validity: that I didn't provide a real world problem to actually solve but rather I gave pre made pages , so more of a maintenance scenario (albeit an important one). Perhaps looking into a comparison between using action and struts tags combo would be a better test. But nobody's talking about not using action servlets so I'm not sure this would even things up.. While this was only to satisfy my own curiosity it more than I've seen published on the matter elsewhere. I also understand that its pragmatic reasons why maintaining a proprietary tag lib could be a distraction from the real business of struts, but I don't want folks telling me its easier when the fact is this isn't known. Cheers Mark On Sunday, August 10, 2003, at 06:24 PM, Reinhard wrote: Mark Lowe wrote: Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? I believe, that tags aren't targeted to programmers but to designers, which where supposed to have less programmer skills. This may be true only for bigger projects ... cheers Reinhard - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL ot struts taglibs?
I think Craig answered this topic about a month ago quite lucidly - check the archives for the full version, but basically he said if you have the choice, use JSTL, otherwise don't worry but at some distant point in the future you will probably have to use JSTL (or whatever else comes along like Java Server Faces). David Thielen wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
Hmm, yeah. I wouldn't hold your breath on that. I mean the JSTL people did feel the need to include database tags, even though no one really thinks that's a good idea (if you do, I'm really not interested). Anyways, it's happy hour, go have a beer (unless you're not in NYC, but I'm not sure if that exists). steve More of a philosophical disagreement than anything. I'm sure I'll end up using JSTL but I am hoping for a little better implementation of some of the tags. That's all. :)
Re: JSTL and Struts-el
Well, as I said...I don't know anything about it. But honestly I think that a good job could be done by taglibs and struts tags as well. One of my developers told me: using JSTL and Struts-el will avoid you from mungling JSPs with Java code. Well I replied...Where is the java code in my JSPs? If you can find any, please show it to me. Let me have a page declarative sentence at the beginning if I need to import a Java class which is needed by the bean:define tag to retrieve a request/session/application attribute. Without specifying the type it would result in an error. What about the String class then? Could I impor the String class without having to write java.lang.String all the time? For the rest, I use taglibs and forgive me if I write bean:message key='%= '\n' + Data causing error: + (String)exception.get(5) ' / but exception is an object prepared in one scope, and because the object is a List (to make the application dynamic), actually, I have to cast it to String to display it. Where's the java code here? How could it be done with less effort by means of JSTL and Struts-el? I would be really interested in it. Marco - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 9:37 PM Subject: Re: JSTL and Struts-el Marco thanks for clearing that up for me.. so have you written some example pages and asked folks what's going on in them then? or by easier you mean you can hack pages together easier? ask someone else to read your pages, think of some questions before you do. Or might they not be bright enough to have insight into any ingenious moments? Don't take my word for it try it out.. although i've only tried 5 people the effect appears quite robust. i'm very happy that having something like shell script in your html pages works for you. Please explain exactly how is it easier? Easier to do what? The only thing it looks easier for is doing stuff that IMO should be done elsewhere.. Help me , put me out of my misery, i don't like debating on this subject but I really think the JSTL is easier premiss is a myth.. and saying oh no it isn't just doesn't convince me. Cheers Mark On Sunday, August 10, 2003, at 08:05 PM, Marco Tedone wrote: Well, I am completely new to the subject, but when I'll put it in action (not to use someone else's words here :)) and if I'll decide that this is better than my current architecture, I'll write to you and say...Hey Mark, JSTL and Struts-el it's easier than Struts taglibs!!! Cheerse, Marco - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 7:17 PM Subject: Re: JSTL and Struts-el All this came up a few weeks ago, so I made a couple of JSP's and asked some folks who're good HTML'ist's to tell me what they thought was going on in the pages. I didn't ask any experts but some folks who use this stuff. Oh .. and guess what I found? The out of the 5 people I've asked so far in my little study that out of 5 examples I made all 5 of them described more accurately what was going on using struts tags than with JSLT. Criticisms of my little pilot include: The examples given kept a lot of the code in action servlets and in some situations using JSLT some teams might choose not to do this; Ecological validity: that I didn't provide a real world problem to actually solve but rather I gave pre made pages , so more of a maintenance scenario (albeit an important one). Perhaps looking into a comparison between using action and struts tags combo would be a better test. But nobody's talking about not using action servlets so I'm not sure this would even things up.. While this was only to satisfy my own curiosity it more than I've seen published on the matter elsewhere. I also understand that its pragmatic reasons why maintaining a proprietary tag lib could be a distraction from the real business of struts, but I don't want folks telling me its easier when the fact is this isn't known. Cheers Mark On Sunday, August 10, 2003, at 06:24 PM, Reinhard wrote: Mark Lowe wrote: Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? I believe, that tags aren't targeted to programmers but to designers, which where supposed to have less programmer skills. This may be true only for bigger projects ... cheers Reinhard - 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
RE: JSTL ot struts taglibs?
The nice thing about those $var style tags is that they are very easy to read, if you use nice names for things, most people can understand the relationships and get something out of them. Also these translate well to my email templates which are in Velocity macros. But I guess the real issue is that XML tends to be pretty long winded, nice for data transport, not so nice when you're trying to read the file on screen. I'm sorry about being jaded against scriptlets, I've had a bad experience with inheriting software with rough ones. The good thing about scriptlets is that they compile, however. Has anyone written something that wil reflect classes used in JSTL tags to at least ensure that the relationships in the tags are possible? I would totally be in to getting more out of compilers that way - this would make refactoring so much better too. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:43 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? You're right, ant does have $var in it I use my IDE to build and forgot. I just think that is a step backwards doing tags that way. So many things are a step backwards like config files for instance. J2EE is supposed to be for the Enterprise which means there is at least a DB and maybe the LDAP at your disposal yet people go back to storing stuff in files. I am just trying to point out when things seem backwards. Certain things (like tags) should be getting more XML like and not more UNIX script like. Let's put our config in a datastore and let's either have programmers doing the UI and accept things like scriptlets or have UI specialist and make it easier on them but not having $var in the tags. That's all I am saying. I definitely was wrong about Ant, sorry. -Original Message- From: Stephen Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:41 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Maybe you could post this to the ECS users group. Scriptlets are fine, but tend to lend themselves to having lots of lines of code in a page that doesn't actually generate html, which is tough to read if you are trying to lay things out. Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What are you talking about? ${var} is pretty standard in Ant. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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
[OT] RE: JSTL ot struts taglibs?
Everyone take a deep breath and think of bunny rabbits. Cute little bunnies ()() ('.') ()() Hmm.. I'm getting hungry now. -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:50 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - 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] __ 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
RE: JSTL ot struts taglibs?
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? Bailey, Shane C. wrote: [Snip] Why should build files be composed of tags at all? I think Ant is great too (a lot better than make), but does the fact that it is tag-based have anything to do with it? No. The reason that the original author went with XML for the structure of Ant build files had nothing to do with tags -- it had to do with hierarchy. See http://tinyurl.com/jg0d to read his thoughts on the matter (sorry for the cachelink but I can't find the official permalink). [/Snip] I don't know why a build file should be composed of tags either. My point was that Ant is nicer and more recently popular than make and the developer could have thought, You know, most people that will be using Any will probably know make so I am going to throw a bunch of == in there and that would be fine. Ant has more of an excuse to have == in the darn thing than a View (geared toward UI and graphic artist specialist) tag set does. And the Ant developer must have seen the light. (All my opinion, of course). [Snip] Faster? Given a programmer with equal knowledge of scriptlets and JSTL, scriptlets are definitely not faster for development. Since when are they faster for performance? Plus they tend to be difficult to read -- and I say this as a former PHP programmer. [/Snip] If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. I know more Java programmers that could get a JSP page drawn if you simple told them % ... % for multiple code segments and do %= ... % to return an expression given all they knew was Java and no Web stuff (including JSTL at all). [Snip] Okay, first of all, JSTL is a JCP specification (JSR-52, for more info see http://jcp.org/aboutJava/communityprocess/final/jsr052/). It's not just some 3rd-party library that is going to be replaced any time soon. Second of all, it is actually a part of the JSP 2.0 specification (just as scriptlets are part of an earlier JSP specification). While scriptlets are still supported in JSP 2.0, it is clear that Sun and the JCP are trying to provide alternatives to scriptlets and at some point they might even be deprecated. [/Snip] Nothing is impossible. I remember being devastated after getting pretty efficient with AWT and then the model changed and then Swing came out. And you even mention how scriptlets WERE part of the spec and are now close to deprecation. So what is so ridiculous about my statement??? [Snip] So sorry, but I had to ask - what the crap were you talking about. [/Snip] No problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - 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]
Re: JSTL and Struts-el
Mark Lowe wrote: Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? I believe, that tags aren't targeted to programmers but to designers, which where supposed to have less programmer skills. This may be true only for bigger projects ... cheers Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and Struts-el
--- Marco Tedone [EMAIL PROTECTED] wrote: Hi everyone, it's quite a long time that I am not monitoring the struts-user list any more...Last time was about three months ago. One of my project's new entry asked me why don't we use JSTL and Struts-el instead of taglibs and Struts tags...Well, last time I posted on this list I asked Craig if the time was mature for JSTL and I've been suggested that it would be better to wait as JSTL were in their beta-release. Two questions: 1) Is now the time to use JSTL? Could we continue to use Struts tags without for it loosing in performance? Yes, JSTL is now finalized and you can/should use it in your apps. The JSTL tags will perform much faster than Struts' tags because containers can optimize the generated code for JSTL. You'll also gain improved development performance as the JSTL tags are more powerful and easier to use. 2) WHAT IS IT Strus-el? Struts-EL is a Struts taglib that allows you to use powerful JSTL Expression Language (EL) statements for the attribute values. David Thank you for any reply, Marco - 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]
Re: [OT] RE: JSTL ot struts taglibs?
Part of the problem is that there are so many ways (none of which are particularly good compared to .NET) to paint pages in Java land. JSF is vapor and has a limited window of opportunity and requires REAL industry support to succeed before the world moves past it. .NET view technology looks really tempting from the outside and there are statistics which support that it enhances developer productivity (this will have a greater importance as time passes). When I started with webapps, I looked around what frameworks are available and who they help in moving ahead. Soon I was convinced about struts, but the different template packages didn't convince me at all. Following the discussion about white and black frameworks, I made up my mind to use something like tiles (and for so treating the webapp as black framework). But the homepage of the creator is last updated last year, the doc about advanced tiles has nearly the same timestamp and big parts classified as outdated. Looking around in discussion-areas tiles doesn't play a big role - so I stumbled. Another big point is the big vacuum around the model (from MVC). But at all the time, I didn't found a problem or question where .NET was the answer. Who ever read the background of the jpetstore competition can not (IMHO) find a good word about .NET So I think, the problem is to bring the good pieces together to build a complete framework to start with. For my opinion - the java comunity already has good solutions, that don't have to fear .NET at all. cheers Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and struts tag libraries
Dudley == Dudley Butt Butt writes: Dudley Hi, Dudley Is it true to say that one should use JSTL instead of the struts taglibs? Dudley If so, is JSTL a seperate topic to be learned and therefore will not be covered in any of the struts books for sale? You'll find that robust applications will use several tag libraries, including both the Struts and JSTL tag libraries. If you're using the JSTL tag library, however, it's probably more convenient to use the Struts-EL tag library (although you still need the struts.jar). You can learn about JSTL from the JSTL specification on the Sun web site. There are several books that cover it, but the specification is a very good start. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and struts tag libraries
yes yes. - but you still need html-el. - Original Message - From: Butt, Dudley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 9:30 AM Subject: JSTL and struts tag libraries Hi, Is it true to say that one should use JSTL instead of the struts taglibs? If so, is JSTL a seperate topic to be learned and therefore will not be covered in any of the struts books for sale? thx NOTICE: This message contains privileged and confidential information intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination, copy or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient, is prohibited. If you received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer. The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message. - 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]
Re: JSTL and Struts-el
All this came up a few weeks ago, so I made a couple of JSP's and asked some folks who're good HTML'ist's to tell me what they thought was going on in the pages. I didn't ask any experts but some folks who use this stuff. Oh .. and guess what I found? The out of the 5 people I've asked so far in my little study that out of 5 examples I made all 5 of them described more accurately what was going on using struts tags than with JSLT. Criticisms of my little pilot include: The examples given kept a lot of the code in action servlets and in some situations using JSLT some teams might choose not to do this; Ecological validity: that I didn't provide a real world problem to actually solve but rather I gave pre made pages , so more of a maintenance scenario (albeit an important one). Perhaps looking into a comparison between using action and struts tags combo would be a better test. But nobody's talking about not using action servlets so I'm not sure this would even things up.. While this was only to satisfy my own curiosity it more than I've seen published on the matter elsewhere. I also understand that its pragmatic reasons why maintaining a proprietary tag lib could be a distraction from the real business of struts, but I don't want folks telling me its easier when the fact is this isn't known. Cheers Mark On Sunday, August 10, 2003, at 06:24 PM, Reinhard wrote: Mark Lowe wrote: Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? I believe, that tags aren't targeted to programmers but to designers, which where supposed to have less programmer skills. This may be true only for bigger projects ... cheers Reinhard - 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]
Re: JSTL and Struts-el
Well, I am completely new to the subject, but when I'll put it in action (not to use someone else's words here :)) and if I'll decide that this is better than my current architecture, I'll write to you and say...Hey Mark, JSTL and Struts-el it's easier than Struts taglibs!!! Cheerse, Marco - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 7:17 PM Subject: Re: JSTL and Struts-el All this came up a few weeks ago, so I made a couple of JSP's and asked some folks who're good HTML'ist's to tell me what they thought was going on in the pages. I didn't ask any experts but some folks who use this stuff. Oh .. and guess what I found? The out of the 5 people I've asked so far in my little study that out of 5 examples I made all 5 of them described more accurately what was going on using struts tags than with JSLT. Criticisms of my little pilot include: The examples given kept a lot of the code in action servlets and in some situations using JSLT some teams might choose not to do this; Ecological validity: that I didn't provide a real world problem to actually solve but rather I gave pre made pages , so more of a maintenance scenario (albeit an important one). Perhaps looking into a comparison between using action and struts tags combo would be a better test. But nobody's talking about not using action servlets so I'm not sure this would even things up.. While this was only to satisfy my own curiosity it more than I've seen published on the matter elsewhere. I also understand that its pragmatic reasons why maintaining a proprietary tag lib could be a distraction from the real business of struts, but I don't want folks telling me its easier when the fact is this isn't known. Cheers Mark On Sunday, August 10, 2003, at 06:24 PM, Reinhard wrote: Mark Lowe wrote: Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? I believe, that tags aren't targeted to programmers but to designers, which where supposed to have less programmer skills. This may be true only for bigger projects ... cheers Reinhard - 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]
Re: JSTL and Struts-el
On Sun, 10 Aug 2003, Marco Tedone wrote: Date: Sun, 10 Aug 2003 22:36:01 +0100 From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: JSTL and Struts-el That's sounds great Craig, thanks. I can guess that you will define what customer is and where to get it somewhere, presumibly a configuration file. In a Struts app, it tends to get stored as a request or session attribute by the execution of an Action (and note that you don't care which scope it is in an EL expression :-). Other ways to get it there include things like jsp:useBean, or Java code that calls request.setAttribute() or session.setAttribute(). Now, to know all this stuff, where shall I look at? Is there any documentation available, does it come with the Struts distribution? (I just realized that I was still in 1.1-rc1 :)) Well, that depends on which stuff you want to know :-). For JSTL, I'd start by reading the JSTL Specification: http://java.sun.com/products/jsp/jstl/ This page also contains pointers to numerous articles and books that include coverage of JSTL. Of the three books, I've only read Shawn's (and it's quite good), but I have no doubt based on previous experience that Hans and David did an excellent job as well. The JSTL jar files (jstl.jar and standard.jar) are included with Struts-EL (in contrib/struts-el/lib) but I would suggest going and getting the 1.0.3 standalone release as well -- pick Taglibs then Standard at: http://jakarta.apache.org/site/binindex.cgi This implementation comes with lots of examples of using each of the tags. The struts-el library itself is included with the Struts 1.1 final release, in the contrib/struts-el subdirectory, along with a small webapp containing examples of each tag in use. You might also want to keep your eyes open for articles about JSP 2.0 (and download Tomcat 5 if you're interested in playing with it). Allowing EL expressions to be used everywhere in a JSP 2.0 page is one of the big usability improvements in this version -- but there are lots more too. Marco Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and Struts-el
That's sounds great Craig, thanks. I can guess that you will define what customer is and where to get it somewhere, presumibly a configuration file. Now, to know all this stuff, where shall I look at? Is there any documentation available, does it come with the Struts distribution? (I just realized that I was still in 1.1-rc1 :)) Marco - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 10:20 PM Subject: Re: JSTL and Struts-el On Sun, 10 Aug 2003, Marco Tedone wrote: Where's the java code here? How could it be done with less effort by means of JSTL and Struts-el? One aspect that hasn't been touched on in this thread (completely aside from readability, which tends to be a subjective judgement call) is the fact that the page author does not need to know as much about the data structures being provided by the application's business logic. (A subset of the same benefit accrues when you use Struts tags, but the expression language syntax is not quite as powerful.) Consider the following scriptlet: %= customer.getName() % It's pretty clear that customer must be some bean (not shown here is the ugliness of getting customer defined as a local variable so that this can actually work). But the key takeaway is that it's clearly a bean property being displayed. If the application developer changes his or her mind about the data representation (say, making customer a Map instead of a bean), the page author is forced to accomodate that change. Now consider a corresponding EL expression (which in a JSP 2.0 container can be used directly in your template text, since EL expressions are allowed everywhere): ${customer.name} Note that this works for a JavaBean, as before. But it also works if customer is really a Map -- in that case it turns into the equivalent of: %= customer.get(name) % instead. Separation of concerns about data representation is very powerful. Note that if you're in a pre-JSP-2.0 container, or you want to use Struts tags instead, you have to go to a little more work: c:out var=${customer.name}/ bean:write name=customer property=name/ but you gain the same benefit of insulation from whether customer is a bean or a Map. In this use case, the Struts and EL versions have essentially equivalent power. EL expressions show their improved value, though, when: * You need more complicated expressions than Struts tags support: ${customer.address[customer.preferredAddress].street[2]} * Your page compiler generates optimized code for the EL expression (Resin and others do this already for JSTL tags), whereas a Struts tag is always going to generate the standard custom tag stuff. In such a container, the performance of the EL variant will be better even if the functionality is equivalent. I would be really interested in it. Appearance to the page author is only one aspect of deciding which approach to take. Marco Craig McClanahan - 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]
RE: JSTL ot struts taglibs?
Before I get bashed again, I meant JSTL is replacing the use of the traditional JSP tags before all the c:when came out. I haven't seen one of those tags in ages. Maybe it will still be called JSTL but maybe their will be nicer replacement tags for some of the ugly logic ones. Maybe that is the solution. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 4:20 PM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? But, what I really meant about JSTL being replaced was in popularity. JSP tags are being replaced (in popularity) with Struts tags, your JSTL, and alike. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 4:02 PM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? Bailey, Shane C. wrote: [Snip] Why should build files be composed of tags at all? I think Ant is great too (a lot better than make), but does the fact that it is tag-based have anything to do with it? No. The reason that the original author went with XML for the structure of Ant build files had nothing to do with tags -- it had to do with hierarchy. See http://tinyurl.com/jg0d to read his thoughts on the matter (sorry for the cachelink but I can't find the official permalink). [/Snip] I don't know why a build file should be composed of tags either. My point was that Ant is nicer and more recently popular than make and the developer could have thought, You know, most people that will be using Any will probably know make so I am going to throw a bunch of == in there and that would be fine. Ant has more of an excuse to have == in the darn thing than a View (geared toward UI and graphic artist specialist) tag set does. And the Ant developer must have seen the light. (All my opinion, of course). [Snip] Faster? Given a programmer with equal knowledge of scriptlets and JSTL, scriptlets are definitely not faster for development. Since when are they faster for performance? Plus they tend to be difficult to read -- and I say this as a former PHP programmer. [/Snip] If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. I know more Java programmers that could get a JSP page drawn if you simple told them % ... % for multiple code segments and do %= ... % to return an expression given all they knew was Java and no Web stuff (including JSTL at all). [Snip] Okay, first of all, JSTL is a JCP specification (JSR-52, for more info see http://jcp.org/aboutJava/communityprocess/final/jsr052/). It's not just some 3rd-party library that is going to be replaced any time soon. Second of all, it is actually a part of the JSP 2.0 specification (just as scriptlets are part of an earlier JSP specification). While scriptlets are still supported in JSP 2.0, it is clear that Sun and the JCP are trying to provide alternatives to scriptlets and at some point they might even be deprecated. [/Snip] Nothing is impossible. I remember being devastated after getting pretty efficient with AWT and then the model changed and then Swing came out. And you even mention how scriptlets WERE part of the spec and are now close to deprecation. So what is so ridiculous about my statement??? [Snip] So sorry, but I had to ask - what the crap were you talking about. [/Snip] No problem. - 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]
Re: JSTL ot struts taglibs?
For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. not to forget: there's a good chance that (in the future) containers will have their own optimized versions of the JSTL-tags, there are already some implemented in TC5.x Yann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: JSTL ot struts taglibs?
It is nice to follow the heard sometimes but other times you just have to step back and say, Can't we do any better?. I am not THAT closed minded if I am convinced that the only real way to write tags to do what JSTL does is to do it the current way then I will gladly use them I just think if there is a better way then we should be about to talk about it. The Big 3 car execs didn't want to talk about the future of the industry and what was more user friendly and now look how they are paying. I'm not mad. Just not convinced. BTW, how could you eat those poor defenseless bunnies :) -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:07 PM To: 'Struts Users Mailing List' Subject: [OT] RE: JSTL ot struts taglibs? Everyone take a deep breath and think of bunny rabbits. Cute little bunnies ()() ('.') ()() Hmm.. I'm getting hungry now. -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:50 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Re: JSTL ot struts taglibs?
Bailey, Shane C. wrote: I'm trying state my opinion and learn (from replies). About the only thing in that statement that I know is verifiably screwed up is that Ant has no $var and I apologized and rectified what I meant in one of my recent posts. Whachu talkin' 'bout Willis? I hadn't read your apology when I replied. But even discounting your error about using variables in Ant, there were so many things I just didn't understand about your post: Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Why should build files be composed of tags at all? I think Ant is great too (a lot better than make), but does the fact that it is tag-based have anything to do with it? No. The reason that the original author went with XML for the structure of Ant build files had nothing to do with tags -- it had to do with hierarchy. See http://tinyurl.com/jg0d to read his thoughts on the matter (sorry for the cachelink but I can't find the official permalink). Scriptlets are more powerful (you can do ANYTHING Java can do), faster, Faster? Given a programmer with equal knowledge of scriptlets and JSTL, scriptlets are definitely not faster for development. Since when are they faster for performance? Plus they tend to be difficult to read -- and I say this as a former PHP programmer. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. Okay, first of all, JSTL is a JCP specification (JSR-52, for more info see http://jcp.org/aboutJava/communityprocess/final/jsr052/). It's not just some 3rd-party library that is going to be replaced any time soon. Second of all, it is actually a part of the JSP 2.0 specification (just as scriptlets are part of an earlier JSP specification). While scriptlets are still supported in JSP 2.0, it is clear that Sun and the JCP are trying to provide alternatives to scriptlets and at some point they might even be deprecated. So sorry, but I had to ask - what the crap were you talking about. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. Don't be so sure. Because the JSTL is standard, containers can optimize the java code generated from JSTL tags. This means a c:if tag can be converted into a real Java if statement instead of creating tag instances and invoking the tag's lifecyle. My understanding is that the Jasper JSP compiler (comes with Tomcat) actually generates faster Java code if you *don't* use scriptlets at all. Resin and Tomcat both optimize JSTL tag usage. So, with the JSTL we get the best of both worlds: Fast page rendering and standardized, powerful and easy to use markup tags. David __ 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]
RE: JSTL ot struts taglibs?
Going by this statement that you replied to and didn't correct anything about it: there's a good chance that (in the future) containers will have their own optimized versions of the JSTL-tags, there are already some implemented in TC5.x It doesn't sound like the optimization is totally there and everywhere. Anyway, I'm not saying that scriptlets are the way to go if you reread all my posts. I am saying the guys who were assigned to write the JSTL tags (at least the logic ones) really dropped the ball by appearing to not know their intended audience (UI specialist which are used to HTML like tags and not ${var} ==). More of a philosophical disagreement than anything. I'm sure I'll end up using JSTL but I am hoping for a little better implementation of some of the tags. That's all. :) -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 4:32 PM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? If they aren't faster in performance then something is wrong. All the JSP rendering practically has to do is put the code as is into the Servlet which is a Java class. No interpretation. I haven't looked at the source but I am sure the optimization for rendering code for Scriptlets vs JSTL has to be there. Don't be so sure. Because the JSTL is standard, containers can optimize the java code generated from JSTL tags. This means a c:if tag can be converted into a real Java if statement instead of creating tag instances and invoking the tag's lifecyle. My understanding is that the Jasper JSP compiler (comes with Tomcat) actually generates faster Java code if you *don't* use scriptlets at all. Resin and Tomcat both optimize JSTL tag usage. So, with the JSTL we get the best of both worlds: Fast page rendering and standardized, powerful and easy to use markup tags. David __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - 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] __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
--- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - 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] __ 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]
Re: JSTL and Struts-el
Sorry Mark, could you please rewrite this email trying to be understandable for an EOFL? Thank you very much :) Marco - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 6:09 PM Subject: Re: JSTL and Struts-el Has this easier to use premiss been run past any folks with good markup skills, but aren't programmers as such? Seems to me the only folks who are saying this is easier lean more toward the programming end of the spectrum than formatting folks. Um the burden of using expert groups. On Sunday, August 10, 2003, at 05:34 PM, David Graham wrote: --- Marco Tedone [EMAIL PROTECTED] wrote: Hi everyone, it's quite a long time that I am not monitoring the struts-user list any more...Last time was about three months ago. One of my project's new entry asked me why don't we use JSTL and Struts-el instead of taglibs and Struts tags...Well, last time I posted on this list I asked Craig if the time was mature for JSTL and I've been suggested that it would be better to wait as JSTL were in their beta-release. Two questions: 1) Is now the time to use JSTL? Could we continue to use Struts tags without for it loosing in performance? Yes, JSTL is now finalized and you can/should use it in your apps. The JSTL tags will perform much faster than Struts' tags because containers can optimize the generated code for JSTL. You'll also gain improved development performance as the JSTL tags are more powerful and easier to use. 2) WHAT IS IT Strus-el? Struts-EL is a Struts taglib that allows you to use powerful JSTL Expression Language (EL) statements for the attribute values. David Thank you for any reply, Marco - 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] - 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]
RE: JSTL ot struts taglibs?
Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and Struts-el
Are you telling me that ${customer.name} it's enough for Struts-el to look for a customer bean stored in any scope and process a getName() method? If so, that's great. Would it be a good approach to have taglibs, jstl and struts from their respective bundles? I downloaded taglibs (complete version, nightly build) and I suppose there is something similar for JSTL. This way we are guaranteed to run always the last versions. For stuff, mainly in my project I'll need to present bean information and to cycle through collections, more or less what an enterprise application is made of, isn't it? One risks to get bored :)) Good night, Marco - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, August 10, 2003 11:23 PM Subject: Re: JSTL and Struts-el On Sun, 10 Aug 2003, Marco Tedone wrote: Date: Sun, 10 Aug 2003 22:36:01 +0100 From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: JSTL and Struts-el That's sounds great Craig, thanks. I can guess that you will define what customer is and where to get it somewhere, presumibly a configuration file. In a Struts app, it tends to get stored as a request or session attribute by the execution of an Action (and note that you don't care which scope it is in an EL expression :-). Other ways to get it there include things like jsp:useBean, or Java code that calls request.setAttribute() or session.setAttribute(). Now, to know all this stuff, where shall I look at? Is there any documentation available, does it come with the Struts distribution? (I just realized that I was still in 1.1-rc1 :)) Well, that depends on which stuff you want to know :-). For JSTL, I'd start by reading the JSTL Specification: http://java.sun.com/products/jsp/jstl/ This page also contains pointers to numerous articles and books that include coverage of JSTL. Of the three books, I've only read Shawn's (and it's quite good), but I have no doubt based on previous experience that Hans and David did an excellent job as well. The JSTL jar files (jstl.jar and standard.jar) are included with Struts-EL (in contrib/struts-el/lib) but I would suggest going and getting the 1.0.3 standalone release as well -- pick Taglibs then Standard at: http://jakarta.apache.org/site/binindex.cgi This implementation comes with lots of examples of using each of the tags. The struts-el library itself is included with the Struts 1.1 final release, in the contrib/struts-el subdirectory, along with a small webapp containing examples of each tag in use. You might also want to keep your eyes open for articles about JSP 2.0 (and download Tomcat 5 if you're interested in playing with it). Allowing EL expressions to be used everywhere in a JSP 2.0 page is one of the big usability improvements in this version -- but there are lots more too. Marco Craig - 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]
Re: JSTL and Struts-el
On Sun, 10 Aug 2003, Marco Tedone wrote: Date: Sun, 10 Aug 2003 23:33:14 +0100 From: Marco Tedone [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: JSTL and Struts-el Are you telling me that ${customer.name} it's enough for Struts-el to look for a customer bean stored in any scope and process a getName() method? If so, that's great. Yep. Thos is also true for JSTL tags in general (and EL expressions throughout JSP 2.0). Would it be a good approach to have taglibs, jstl and struts from their respective bundles? I downloaded taglibs (complete version, nightly build) and I suppose there is something similar for JSTL. This way we are guaranteed to run always the last versions. Well, JSTL is just *one* of the Jakarta Taglibs libraries. If that is the only one you're going to use, you don't need all of them. For stuff, mainly in my project I'll need to present bean information and to cycle through collections, more or less what an enterprise application is made of, isn't it? One risks to get bored :)) Good night, Marco Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL ot struts taglibs?
If I knew then I would be selling you some awesome piece of software that solved all your problems, now wouldn't I? I'm trying state my opinion and learn (from replies). About the only thing in that statement that I know is verifiably screwed up is that Ant has no $var and I apologized and rectified what I meant in one of my recent posts. Whachu talkin' 'bout Willis? -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 2:53 PM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? Bailey, Shane C. wrote: Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What the crap are you talking about. Erik - 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]
RE: JSTL ot struts taglibs?
Maybe you could post this to the ECS users group. Scriptlets are fine, but tend to lend themselves to having lots of lines of code in a page that doesn't actually generate html, which is tough to read if you are trying to lay things out. Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What are you talking about? ${var} is pretty standard in Ant. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL ot struts taglibs?
So many things are a step backwards like config files for instance. J2EE is supposed to be for the Enterprise which means there is at least a DB and maybe the LDAP at your disposal yet people go back to storing stuff in files. I don't agree. You have to think about the time after the rollout - so, things which are not subject of change, IMHO are ok in config files. All other stuff it's already possible, read from database. So I can see no step backward. cheers Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL ot struts taglibs?
--- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. David thanks - dave __ 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]
Re: JSTL ot struts taglibs?
--- Yann Cébron [EMAIL PROTECTED] wrote: For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use, potentially faster, and a Java standard. not to forget: there's a good chance that (in the future) containers will have their own optimized versions of the JSTL-tags, there are already some implemented in TC5.x Yeah, that's what I meant by potentially faster. I'm really glad to hear that Tomcat 5 has some of these tags optimized! David Yann - 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]
RE: [OT] RE: JSTL ot struts taglibs?
You got me there. lol -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:24 PM To: 'Struts Users Mailing List' Subject: RE: [OT] RE: JSTL ot struts taglibs? Just like you never said JSF will replace JSTL I never said I was going to eat a bunny. ;) -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:05 PM To: 'Struts Users Mailing List' Subject: RE: [OT] RE: JSTL ot struts taglibs? It is nice to follow the heard sometimes but other times you just have to step back and say, Can't we do any better?. I am not THAT closed minded if I am convinced that the only real way to write tags to do what JSTL does is to do it the current way then I will gladly use them I just think if there is a better way then we should be about to talk about it. The Big 3 car execs didn't want to talk about the future of the industry and what was more user friendly and now look how they are paying. I'm not mad. Just not convinced. BTW, how could you eat those poor defenseless bunnies :) -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:07 PM To: 'Struts Users Mailing List' Subject: [OT] RE: JSTL ot struts taglibs? Everyone take a deep breath and think of bunny rabbits. Cute little bunnies ()() ('.') ()() Hmm.. I'm getting hungry now. -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:50 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David
RE: [OT] RE: JSTL ot struts taglibs?
BTW, how could you eat those poor defenseless bunnies They're very nice in a pie. Bunny stew is also pretty good. ;-) Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL ot struts taglibs?
Bailey, Shane C. wrote: Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What the crap are you talking about. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: JSTL ot struts taglibs?
Have you even tried Curried Bunny? It's Japanese curry I am talking about. BTW, how could you eat those poor defenseless bunnies First I have to do the tongue test in order to taste the flavoring, then I open up my mouth and slowly take in the rich, creamy chunk of bunny meat Me lilly hungie. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 10:22 AM To: Struts Users Mailing List Subject: RE: [OT] RE: JSTL ot struts taglibs? BTW, how could you eat those poor defenseless bunnies They're very nice in a pie. Bunny stew is also pretty good. ;-) Simon - 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]
RE: [OT] RE: JSTL ot struts taglibs?
I didn't mean to imply that who sees what and when and logic in the JSP is always a form of business logic. That is a good example. I am just trying to figure out a way so that all the logic in the JSPs isn't duplicated if you need to also support the same functionality in a Swing app. I think I heard about a framework which attempts to determine views for Web and Swing based apps already out there. Was it Eclipse? Anyway, in Swing I don't think you need that drawing logic. Once the components are set, you have an event which triggers showing the correct tab. So, I am wondering if you can get rid of that in the JSPs with an already written or future framework? -Original Message- From: Brown, Melonie S. - Contractor [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 2:26 PM To: '[EMAIL PROTECTED]' Subject: [OT] RE: JSTL ot struts taglibs? I agree that *business* logic shouldn't be in the view, but what about formatting logic that is specific to web pages? As an example, let's say that you had the following html code to do tabbed menus: [borrowed from http://www.clagnut.com/writings/csstabs/] div id=topnav ul lia href=#Home/a/li lia href=# class=hereAbout/a/li lia href=#News/a/li /ul /div Would you consider the following to be bad? div id=topnav ul li c:forEach items=${menu.customizedMenuItems} var=perms c:choose c:when test='${perms.currentItem eq Y}' a href=c:out value='${perms.link}'/ class=here c:out value='${perms.description}'/ /a /c:when c:otherwise a href=c:out value='${perms.link}'/ c:out value='${perms.description}'/ /a /c:otherwise /c:choose /c:forEach /li /ul Original Message Subject: [OT] RE: JSTL ot struts taglibs? Date: Fri, 8 Aug 2003 13:47:02 -0400 From: Bailey, Shane C. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] Newsgroups: gmane.comp.jakarta.struts.user [snip] In theory it seems like there should be no logic in the View since 1. who sees what and when could be considered business logic and 2. you would want to try and make that who sees what where logic exist in a place where both your Web app and Swing app (for instance) can get to it. - 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]
RE: JSTL ot struts taglibs?
As long as they keep this part of the tag libraries: http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl-p5.html JSTL will be an asset to all MVC architectures out there!!! :-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: JSTL ot struts taglibs?
When I say I don't like $var in tags I mean more like I don't like script like code in tags. That is why I was confused for a second that Ant didn't have $var, I meant I am not used to seeing real script like code in Ant e.g. c:when test=${item.type == 'book'} , note == in the tag. Ant has no == (that I have had to use). You do need to be able to differentiate between take this string literally or evaluate it so I do see why ant does that. I meant Ant was able to make make files so much better without having to have this: ant:compile condition=$target == install. I think seeing == in JSTL tags really just turned me off because it makes me think JSTL is a wolf (scriptlet code) in sheeps clothing. I just don't think that c:when test=${item.type == 'book'} is easier to read (for a UI person) than logic:equal name=whatever property=type value=book Then a JSTL guy will probably say you don't have to use == you can use eq or something but then I say that leaves it open so that == will be used by some and it will be harder for UI people who are used to html. In theory it seems like there should be no logic in the View since 1. who sees what and when could be considered business logic and 2. you would want to try and make that who sees what where logic exist in a place where both your Web app and Swing app (for instance) can get to it. -Original Message- From: Stephen Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 1:20 PM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? The nice thing about those $var style tags is that they are very easy to read, if you use nice names for things, most people can understand the relationships and get something out of them. Also these translate well to my email templates which are in Velocity macros. But I guess the real issue is that XML tends to be pretty long winded, nice for data transport, not so nice when you're trying to read the file on screen. I'm sorry about being jaded against scriptlets, I've had a bad experience with inheriting software with rough ones. The good thing about scriptlets is that they compile, however. Has anyone written something that wil reflect classes used in JSTL tags to at least ensure that the relationships in the tags are possible? I would totally be in to getting more out of compilers that way - this would make refactoring so much better too. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:43 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? You're right, ant does have $var in it I use my IDE to build and forgot. I just think that is a step backwards doing tags that way. So many things are a step backwards like config files for instance. J2EE is supposed to be for the Enterprise which means there is at least a DB and maybe the LDAP at your disposal yet people go back to storing stuff in files. I am just trying to point out when things seem backwards. Certain things (like tags) should be getting more XML like and not more UNIX script like. Let's put our config in a datastore and let's either have programmers doing the UI and accept things like scriptlets or have UI specialist and make it easier on them but not having $var in the tags. That's all I am saying. I definitely was wrong about Ant, sorry. -Original Message- From: Stephen Brown [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:41 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Maybe you could post this to the ECS users group. Scriptlets are fine, but tend to lend themselves to having lots of lines of code in a page that doesn't actually generate html, which is tough to read if you are trying to lay things out. Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! What are you talking about? ${var} is pretty standard in Ant. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: August 8, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java
RE: [OT] RE: JSTL ot struts taglibs?
Just like you never said JSF will replace JSTL I never said I was going to eat a bunny. ;) -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:05 PM To: 'Struts Users Mailing List' Subject: RE: [OT] RE: JSTL ot struts taglibs? It is nice to follow the heard sometimes but other times you just have to step back and say, Can't we do any better?. I am not THAT closed minded if I am convinced that the only real way to write tags to do what JSTL does is to do it the current way then I will gladly use them I just think if there is a better way then we should be about to talk about it. The Big 3 car execs didn't want to talk about the future of the industry and what was more user friendly and now look how they are paying. I'm not mad. Just not convinced. BTW, how could you eat those poor defenseless bunnies :) -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 12:07 PM To: 'Struts Users Mailing List' Subject: [OT] RE: JSTL ot struts taglibs? Everyone take a deep breath and think of bunny rabbits. Cute little bunnies ()() ('.') ()() Hmm.. I'm getting hungry now. -Tim -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:50 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Another debate. Your debate was to make me feel like I was doing something wrong by posting my opinion. There was no debate. The tags do speak for themselves and if you think that $var which Java allows but is NEVER used is acceptable syntax for a tag then that speaks volumes as well. Never said, JSF will replace JSTL. I just said let's see what that technology and others has in store in the near future. Java didn't have every API and package when it first came out so, like I said, we will see what JSF has to offer in the near future. I'm just hoping it is some replacement for those step backwards tags. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:51 AM To: Struts Users Mailing List Subject: RE: JSTL ot struts taglibs? --- Bailey, Shane C. [EMAIL PROTECTED] wrote: Don't get me wrong, I think scriptlets are ugly and shouldn't be used but like I said JSTL is not da bomb and if already know Struts tags I wouldn't go rewriting my code to JSTL until I have seen what JSF and any new technology near by has in store. JSF is not a replacement for JSTL. They complement each other. I'm just saying all the reasons listed do not necessarily mean a whole lot since scriptlets can fit nearly everything said about JSTL but yet everybody agrees not to use scriptlets. I am just giving another opinion. The question had nothing to do with scriptlets. It was about using JSTL or Struts tags. I'm not going to participate in another JSTL debate. The tags speak for themselves. David -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 11:21 AM To: 'Struts Users Mailing List' Subject: RE: JSTL ot struts taglibs? Scriptlets are more powerful (you can do ANYTHING Java can do), faster, is a standard (it is the Java language you know) and if you are going to spend time learning a new language (${var} == pooPoo) then you would be better off learning Java (assuming you don't already know it) cause then you could do scriptlets and middle tier coding and more whereas if you use your time learning JSTL all you will know is JSTL. Believe me, JSTL will be easy to replace if someone comes out with an alternative. I am a programmer but I understand the importance of having the tags be similar to HTML tags and not like tags containing scriptlets. If it makes you happy $var is a legal Java variable name so you could just write scriptlets with $var and no one would realize you weren't writing JSTL :) Why do you think Ant is so popular??? It got rid of all the $var UNIX script like crap and made it more like tags should be!!! Bottom line is, yes, Struts tags aren't the best but JSTL is not much better and will probably be replaced with something not so ugly in the future. Just my .02 sense. I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 10:28 AM To: Struts Users Mailing List Subject: Re: JSTL ot struts taglibs? --- David Thielen [EMAIL PROTECTED] wrote: Hi; For the logic and I18N taglibs - what do you recommend - using the struts taglibs or the JSTL taglibs? Definitely JSTL. They're more powerful, easier to use
Re: JSTL ot struts taglibs?
I like it how some people don't get disturbed by questions about connecting to a database with JDBC to the Struts user list but get mad if you post a differing opinion about the crappy way some tags were written that interfaces with Struts code. What an ACE! [vote]: +1000 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and Struts
Since you are relying on the browser anyways, I'd use javascript for this. The numbers would stay formatted as you change them then. As a caveat, you really need to check the values on the server side afterwards. Steve -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 12:23 PM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts exactly -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:16 PM To: Struts Users Mailing List Subject: Re: JSTL and Struts Mainguy, Mike wrote: When I return a currency or date value, the client has a specific format they want it in. i.e. $1,000.000 or 02/02/2003. Do you mean you are using an input tag for display purposes (i.e. returning data to the browser with an input tag that has a default value). Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL and Struts
One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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]
RE: JSTL and Struts
I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and Struts
I think it would help if you spelled out for yourself exactly what this functionality really means. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:44 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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]
RE: JSTL and Struts
To quote my earlier message: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. Is that not clear, I can be more specific if necessary, but I thought my intent was obvious. -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 11:36 AM To: Struts Users Mailing List Subject: RE: JSTL and Struts I think it would help if you spelled out for yourself exactly what this functionality really means. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:44 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal
RE: JSTL and Struts
Hey Mike, Why would you need the formatting inside of an input tag? You are only processing the data on the server side and that doesn't require formatting or am I missing something here? Chuck -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:45 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts To quote my earlier message: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. Is that not clear, I can be more specific if necessary, but I thought my intent was obvious. -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 11:36 AM To: Struts Users Mailing List Subject: RE: JSTL and Struts I think it would help if you spelled out for yourself exactly what this functionality really means. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:44 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments
RE: JSTL and Struts
When I return a currency or date value, the client has a specific format they want it in. i.e. $1,000.000 or 02/02/2003. -Original Message- From: Canning, Chuck [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 11:55 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts Hey Mike, Why would you need the formatting inside of an input tag? You are only processing the data on the server side and that doesn't require formatting or am I missing something here? Chuck -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:45 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts To quote my earlier message: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. Is that not clear, I can be more specific if necessary, but I thought my intent was obvious. -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 11:36 AM To: Struts Users Mailing List Subject: RE: JSTL and Struts I think it would help if you spelled out for yourself exactly what this functionality really means. -Original Message- From: Mainguy, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 7:44 AM To: 'Struts Users Mailing List' Subject: RE: JSTL and Struts I did it that way in a previous application and it seemed to work well, but it just seems like this functionality is so necessary that it would be built into the presentation taglib (and perhaps with the validator framework). Is it safe to say that perhaps it has not been implemented or discussed because it is an obvious shortcoming and something that will be better addressed by JSF than by rewriting chunks of the delivered stuff? -Original Message- From: Vic Cekvencih [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: Re: JSTL and Struts One way is to localize inside the getter of the formbean. .V Mainguy, Mike wrote: I'm in a quandary. We're examining a way to do simple formatting of our model data. For example, when currency data comes out of the database, it needs to be rendered as $1,000.00 or whatever. This is a very common thing and we where going to do it using a custom formatting object to do this when we move the data from the model into the form (and visa versa). After some examination, it turns out the JSTL does this, but it doesn't appear to support it for input tags. How is this possible!? Am I missing something? Why would that not be the case, how often (in a business app) would you need to format data for display, but not for edit? Does anyone have any insight on best practices/direction in this arena? Typically we would do this in a utility class in the manner described above, but it seems a little clunky doing it this way given the state of the current tag-libs. This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - 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] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail
Re: JSTL and Struts
Mainguy, Mike wrote: When I return a currency or date value, the client has a specific format they want it in. i.e. $1,000.000 or 02/02/2003. Do you mean you are using an input tag for display purposes (i.e. returning data to the browser with an input tag that has a default value). Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and Struts
exactly -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:16 PM To: Struts Users Mailing List Subject: Re: JSTL and Struts Mainguy, Mike wrote: When I return a currency or date value, the client has a specific format they want it in. i.e. $1,000.000 or 02/02/2003. Do you mean you are using an input tag for display purposes (i.e. returning data to the browser with an input tag that has a default value). Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and Struts
Or rather, the value stored in my database -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 12:16 PM To: Struts Users Mailing List Subject: Re: JSTL and Struts Mainguy, Mike wrote: When I return a currency or date value, the client has a specific format they want it in. i.e. $1,000.000 or 02/02/2003. Do you mean you are using an input tag for display purposes (i.e. returning data to the browser with an input tag that has a default value). Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and its contents (to include attachments) are the property of Kmart Corporation (Kmart) and may contain confidential and proprietary information. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, you should delete this message immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL or Struts taglib: on a large project
Thanks for the feedback, it's been a help. We'll be using JSTL standard taglibs for the basics, like iterate and display values. Stritz ___ --- Hohlen, John C [EMAIL PROTECTED] wrote: We've been using JSTL for about 6 months now. It works great. Our developers like it much better -- especially with the addition of the Expression Language. We always try to use the JSTL tags when an equivalent Struts tag exists. ... Definitely plan on using JSTL. It's a step in the right direction with many benefits. I don't think you have much to worry about there. --- Karr, David [EMAIL PROTECTED] wrote: There were some particular problems with Struts-EL in RC1, but RC2 should be fine. I haven't heard of any more issues. --- Vic Cekvenich [EMAIL PROTECTED] wrote: * JSTL should be used when ever possible! * Try to limit use of bean and logic. One JSTL issue I am not able to solve: Localization... it tends to work better using Struts tags, I have not found a great way to have it work using FMT tag. __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL or Struts taglib: on a large project
1,000 + JSPs? I want in! (I could show you to code it faster). IMO: * JSTL should be used when ever possible! * Try to limit use of bean and logic. One JSTL issue I am not able to solve: Localization... it tends to work better using Struts tags, I have not found a great way to have it work using FMT tag. hth, .V John Stritzinger wrote: I'm working on a large project team that's been using the Struts taglibs, not -el taglibs, with extensive use of logic:iterate, bean:write, bean:message, and html:form with html:text and other field tags. The usual suspects, in our JSPs. We are just about to begin work on a large development effort for a production system, about 1000+ JSP pages, and are debating whether to switch to JSTL standard taglib (1.0.3 current version). The Struts site has several references and recommendations for future work (e.g., Intro to logic taglib; struts-faces proposal; Struts 2.0; etc), and the JSP 2.0 spec, final draft 3, incorporates expression language (el). So it sure looks like the vote is for JSTL, at least for tags such as c:forEach, c:out, and use of el. But our team is a little nervous about switching from something that's working to something that we've used (JSTL) but not extensively to the point of proven-in-production. I've looked through the source code for some tags, like logic:iterate (IterateTag) compared to c:forEach (ForEachTag, ForEachSupport), and the JSTL code looks like it will handle our needs just fine. Reading the JSTL bug list (short list), the type of issues discussed on this and other mailing lists, it also seems like JSTL has been stable for a while and is in wide use. So what's the question? Welllooking for some real-world feedback about using the JSTL tags, and switching from the Struts tags to JSTL tags. Has anyone been using the JSTL standard taglib on a large site that's in production/live? Or gone through some conversion/refactoring efforts from Struts to JSTL taglibs? Appreciate any feedback. Thanks in advance, Stritz __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- Vic Cekvenich, Struts Instructor, 1-800-917-JAVA Advanced a href =baseBeans.comStruts Training/a and project recovery in North East. Open Source a href =baseBeans.comContent Management/a basicPortal sofware Best practicea href =baseBeans.comStruts Support/a v.1.1 helper ScafflodingXPress
RE: JSTL or Struts taglib: on a large project
We've been using JSTL for about 6 months now. It works great. Our developers like it much better -- especially with the addition of the Expression Language. Our application hasn't gone into production yet, but it will later this year. We're a medium size team (around 15 developers). Our application is critical to our business and in the end will have several hundred screens. We always try to use the JSTL tags when an equivalent Struts tag exists. We've looked at using the Struts-EL tag library. Unfortunately, that subproject has never been released with corresponding versions for Struts 1.1 B1, B2, B3, RC1, or RC2. So every time I try to use Struts-EL, there is always a tag that blows up. So we haven't had much success with Struts-EL, but the concept behind the library is good. Maybe it's better now, I haven't tried it in a while. Definitely plan on using JSTL. It's a step in the right direction with many benefits. I don't think you have much to worry about there. JOHN -Original Message- From: John Stritzinger [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 8:04 AM To: [EMAIL PROTECTED] Subject: JSTL or Struts taglib: on a large project I'm working on a large project team that's been using the Struts taglibs, not -el taglibs, with extensive use of logic:iterate, bean:write, bean:message, and html:form with html:text and other field tags. The usual suspects, in our JSPs. We are just about to begin work on a large development effort for a production system, about 1000+ JSP pages, and are debating whether to switch to JSTL standard taglib (1.0.3 current version). The Struts site has several references and recommendations for future work (e.g., Intro to logic taglib; struts-faces proposal; Struts 2.0; etc), and the JSP 2.0 spec, final draft 3, incorporates expression language (el). So it sure looks like the vote is for JSTL, at least for tags such as c:forEach, c:out, and use of el. But our team is a little nervous about switching from something that's working to something that we've used (JSTL) but not extensively to the point of proven-in-production. I've looked through the source code for some tags, like logic:iterate (IterateTag) compared to c:forEach (ForEachTag, ForEachSupport), and the JSTL code looks like it will handle our needs just fine. Reading the JSTL bug list (short list), the type of issues discussed on this and other mailing lists, it also seems like JSTL has been stable for a while and is in wide use. So what's the question? Welllooking for some real-world feedback about using the JSTL tags, and switching from the Struts tags to JSTL tags. Has anyone been using the JSTL standard taglib on a large site that's in production/live? Or gone through some conversion/refactoring efforts from Struts to JSTL taglibs? Appreciate any feedback. Thanks in advance, Stritz __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - 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]
RE: JSTL or Struts taglib: on a large project
-Original Message- From: Hohlen, John C [mailto:[EMAIL PROTECTED] We always try to use the JSTL tags when an equivalent Struts tag exists. We've looked at using the Struts-EL tag library. Unfortunately, that subproject has never been released with corresponding versions for Struts 1.1 B1, B2, B3, RC1, or RC2. So every time I try to use Struts-EL, there is always a tag that blows up. So we haven't had much success with Struts- EL, but the concept behind the library is good. Maybe it's better now, I haven't tried it in a while. There were some particular problems with Struts-EL in RC1, but RC2 should be fine. I haven't heard of any more issues. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL in Struts
I'd bet you forgot to add the %@ taglib % declaration for the XML library at the top of your page. JSTL is made up of several tag libraries, not just one. %@ taglib prefix=x uri=http://java.sun.com/jstl/xml; % Hi Craig, how much you will bet. i have this declaration. and i still do not know why this not work. thx georg -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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]
Re: JSTL x STRUTS bean display
In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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]
Re: JSTL x STRUTS bean display
Try changing: c:out value=${item.Field1}/ - c:out value=${item.field1}/ and: c:out value=${item.Field2}/ - c:out value=${item.field2}/ Quoting V. Cekvenich [EMAIL PROTECTED]: In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL x STRUTS bean display
Not quite sure I understand why the basicPortal link is a good example of looping. Here's the (reformatted) snippet: c:forEach var=row items=${requestScope.formBean} tr tdlic:out value=${requestScope.formBean.taskName}//td td c:url value=/do/port/tasks var=url c:param name=ID value=${requestScope.formBean.id}/ /c:url a href ='c:out value=${url}/' c:out value=${requestScope.formBean.shortCode}/ /a /td tdc:out value=${requestScope.formBean.taskType}//td tdc:out value=${requestScope.formBean.responsibleMail}//td /tr /c:forEach Shouldn't all the requestScope.formBean references within the loop get changed to row? Obviously, this page is taken out of context from the entire app, so maybe I'm missing something... Quoting V. Cekvenich [EMAIL PROTECTED]: In a secret place: http://jakarta.apache.org/struts/resources you can find a link to this (www.basicPortal.com) http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/basicportal_07/portlets/proj/TasksLstPortlet.jsp?rev=1.4content-type=text/vnd.viewcvs-markup Here is another hiden place, where you can find that this was already answered like 4 times: http://www.mail-archive.com/struts-user%40jakarta.apache.org/ .V ps: (new e-mail is vc at baseBeans.com, not [EMAIL PROTECTED]) Joao Araujo wrote: I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
All that does is change the way that the BEAN1_LIST attribute is located. In your example, it's effectively pageContext.findAttribute(BEAN1_LIST). In the original, it's request.getAttribute(BEAN1_LIST). Either should work just fine. I think the real problem is that item.Field1 and item.Field2 should use a lower-case f to reference the properties. Quoting Frank Renaers [EMAIL PROTECTED]: c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL x STRUTS bean display
All that does is change the way that the BEAN1_LIST attribute is located. In your example, it's effectively pageContext.findAttribute(BEAN1_LIST). In the original, it's request.getAttribute(BEAN1_LIST). Either should work just fine. I think the real problem is that item.Field1 and item.Field2 should use a lower-case f to reference the properties. Thank you. Working. Quoting Frank Renaers [EMAIL PROTECTED]: c:forEach var=item items=${BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach -Original Message- From: Joao Araujo [mailto:[EMAIL PROTECTED]] Sent: dinsdag 10 december 2002 14:49 To: Struts Users Mailing List Subject: Re: JSTL x STRUTS bean display I have a arraylist containing a collection of beans, something like : List list = new ArrayList (); list.add(bean1_1); list.add(bean1_2); request.setAttribute (BEAN1_LIST, list); c:forEach var=item items=${requestScope.BEAN1_LIST} c:out value=${item.Field1}/ c:out value=${item.Field2}/ /c:forEach This does not work. I tried this before. Has to be something else. Joao, -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- 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]
Re: JSTL or Struts Tags: Required Field Indication
I've defined a message in my resource bundle like this: required.icon=span class=required*/span and I output it like this fmt:message key=required.icon/ next to my field names. Alternatively, you could use standard label elements and apply a style to them so they show up in red or bold (i.e. label for=username class=required). Both these approaches don't require tag subclasses. David From: Hohlen, John [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: JSTL or Struts Tags: Required Field Indication Date: Mon, 25 Nov 2002 14:19:01 -0600 My team extended the Struts bean:message custom tag to accept an additional attribute called required. If this optional attribute is set to true, then a red asterisk is appended to the text corresponding to the key. For example, the following tag: abc:beanMessage key=login.userId required=true/ would produce the following: User ID* Obviously, placing the code to generate the required field marker in the tag creates a single isolation point for future changes. For example, if it desired to make the asterisk blue instead of red, or to place the asterisk at the beginning of the label instead of the end. Otherwise, if this wasn't part of the tag, then every JSP with a required field would have to be changed. More specifically, JSPs would contain the following: bean:message key=login.userId/font color=red*/font Are others extending the Struts tags to generate the required field marker? My team is also interested in using JSTL and the Struts-EL subproject. Is there an existing tag in either of these libraries that could be used? Unlike the Struts tags, the JSTL tags can't really be extended since you don't have access to the JSTL implementation (source), correct? I realize I could extend the JSTL tags provided via the Jakarta implementation (since the source is available), but my extensions most likely wouldn't work once I started using my container's implementation, correct? Thanks, JOHN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL or Struts Tags: Required Field Indication
David, First, thanks for taking time to reply. I think I prefer your first approach over the second. Our users want to see a red asterisk next to the required field name. However, the one drawback I see with your suggested approach is if we decide to make the required field marker (again, a red asterisk) a prefix instead of a suffix, we have to modify every JSP. In other words, globally changing the character/color for the required field indication can be controlled via the resource bundle and stylesheet. But changing, it's location can't -- unless we extend the Struts tags. But, we really want to keep the number of Struts tags that we extend to a minimum, as that will minimize the pain when migrating to new releases of Struts. JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 2:45 PM To: [EMAIL PROTECTED] Subject: Re: JSTL or Struts Tags: Required Field Indication I've defined a message in my resource bundle like this: required.icon=span class=required*/span and I output it like this fmt:message key=required.icon/ next to my field names. Alternatively, you could use standard label elements and apply a style to them so they show up in red or bold (i.e. label for=username class=required). Both these approaches don't require tag subclasses. David From: Hohlen, John [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: JSTL or Struts Tags: Required Field Indication Date: Mon, 25 Nov 2002 14:19:01 -0600 My team extended the Struts bean:message custom tag to accept an additional attribute called required. If this optional attribute is set to true, then a red asterisk is appended to the text corresponding to the key. For example, the following tag: abc:beanMessage key=login.userId required=true/ would produce the following: User ID* Obviously, placing the code to generate the required field marker in the tag creates a single isolation point for future changes. For example, if it desired to make the asterisk blue instead of red, or to place the asterisk at the beginning of the label instead of the end. Otherwise, if this wasn't part of the tag, then every JSP with a required field would have to be changed. More specifically, JSPs would contain the following: bean:message key=login.userId/font color=red*/font Are others extending the Struts tags to generate the required field marker? My team is also interested in using JSTL and the Struts-EL subproject. Is there an existing tag in either of these libraries that could be used? Unlike the Struts tags, the JSTL tags can't really be extended since you don't have access to the JSTL implementation (source), correct? I realize I could extend the JSTL tags provided via the Jakarta implementation (since the source is available), but my extensions most likely wouldn't work once I started using my container's implementation, correct? Thanks, JOHN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- 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]
RE: JSTL or Struts Tags: Required Field Indication
Another drawback to my approach is that it's more typing. Your added attribute is quite convenient. How often do you change the position of the asterisk? Probably never but it would be nice to not have to change every JSP. That's why I like the label approach is better. BTW, I've also defined this message key: required.msg=span class=required*/span indicates a required field. that I output before each form. David From: Hohlen, John [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] CC: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: JSTL or Struts Tags: Required Field Indication Date: Mon, 25 Nov 2002 15:24:47 -0600 David, First, thanks for taking time to reply. I think I prefer your first approach over the second. Our users want to see a red asterisk next to the required field name. However, the one drawback I see with your suggested approach is if we decide to make the required field marker (again, a red asterisk) a prefix instead of a suffix, we have to modify every JSP. In other words, globally changing the character/color for the required field indication can be controlled via the resource bundle and stylesheet. But changing, it's location can't -- unless we extend the Struts tags. But, we really want to keep the number of Struts tags that we extend to a minimum, as that will minimize the pain when migrating to new releases of Struts. JOHN -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 2:45 PM To: [EMAIL PROTECTED] Subject: Re: JSTL or Struts Tags: Required Field Indication I've defined a message in my resource bundle like this: required.icon=span class=required*/span and I output it like this fmt:message key=required.icon/ next to my field names. Alternatively, you could use standard label elements and apply a style to them so they show up in red or bold (i.e. label for=username class=required). Both these approaches don't require tag subclasses. David From: Hohlen, John [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts-User (E-mail) [EMAIL PROTECTED] Subject: JSTL or Struts Tags: Required Field Indication Date: Mon, 25 Nov 2002 14:19:01 -0600 My team extended the Struts bean:message custom tag to accept an additional attribute called required. If this optional attribute is set to true, then a red asterisk is appended to the text corresponding to the key. For example, the following tag: abc:beanMessage key=login.userId required=true/ would produce the following: User ID* Obviously, placing the code to generate the required field marker in the tag creates a single isolation point for future changes. For example, if it desired to make the asterisk blue instead of red, or to place the asterisk at the beginning of the label instead of the end. Otherwise, if this wasn't part of the tag, then every JSP with a required field would have to be changed. More specifically, JSPs would contain the following: bean:message key=login.userId/font color=red*/font Are others extending the Struts tags to generate the required field marker? My team is also interested in using JSTL and the Struts-EL subproject. Is there an existing tag in either of these libraries that could be used? Unlike the Struts tags, the JSTL tags can't really be extended since you don't have access to the JSTL implementation (source), correct? I realize I could extend the JSTL tags provided via the Jakarta implementation (since the source is available), but my extensions most likely wouldn't work once I started using my container's implementation, correct? Thanks, JOHN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL in Struts.
The Struts-EL supports EL just like JSTL. But the Struts-EL project is all the Struts custom tags you're used to, less functionality covered by tags in the JSTL. In essence, it forces developers to use the JSTL for certain functionality instead of relying on the Struts tags. This how this would have been if the JSTL was developed before the Struts custom tags. But the JSTL came after Struts, resulting in duplicate functionality between the two tag libraries. Hence, using Struts-EL encourages the use of standard custom tags (i.e. JSTL) in lieu of the Struts tags, where possible. Here's some more info from the readme file in the Struts-EL project: Struts-EL extension === Introduction This subproject is an extension of the Struts tag library. Each JSP custom tag in this library is a subclass of an associated tag in the Struts tag library. One difference is that this tag library does not use rtexprvalues, it uses the expression evaluation engine in the JSP Standard Tag Library (version 1.0) to evaluate attribute values. In addition, some of the Struts tags were not ported to this library, as it was determined that their functionality was entirely supplied by the JSTL. These particular Struts tags, and the reason for their non-porting will be described in the documentation for this library. In order to fully understand the correct utilization of this library, you must understand the use and operation of the Struts tag library, and the use and operation of the JavaServer Pages Standard Tag Library (hereafter called the JSTL), along with the expression language (sometimes called the EL) used for evaluating attribute values. Tag Mapping --- In implementing the Struts-EL library, every Struts tag that provides a feature that is not covered by the JSTL (1.0) library is mapped into the Struts-EL library. This section reviews which Struts tags are NOT implemented in the Struts-EL library, and which JSTL tags provide that feature. Many of the non-porting decisions were based on the fact that the JSTL expression language itself provides the same functionality. In those cases, in addition to a possible JSTL tag name, the symbol EL will be listed. Bean Tag Library Tags NOT Implemented in Struts-EL == Struts TagJSTL Tag -- cookiec:set, EL definec:set, EL headerc:set, EL include c:import parameter c:set, EL write c:out Logic Tag Library Tags NOT Implemented in Struts-EL === Struts TagJSTL Tag -- empty c:if, c:when, EL equal c:if, c:when, EL greaterEqual c:if, c:when, EL greaterThan c:if, c:when, EL lessEqual c:if, c:when, EL lessThan c:if, c:when, EL notEmpty c:if, c:when, EL notEqual c:if, c:when, EL notPresentc:if, c:when, EL present c:if, c:when, EL Html Tag Library Tags NOT Implemented in Struts-EL == None (all of them were ported). Attribute Mapping - At this point of the implementation, there is only one change (to two similar tags) to the set of attributes between the Struts tags, and the Struts-EL tags. The logic:match and logic:notMatch tags have an additional attribute named expr, which can take any value, and will be used as the value to compare against, in addition to the choices of cookie, header, name/property, and parameter. Usage Requirements -- The Struts-EL tag library requires the use of the Struts tag library, and the Java Server Pages Standard Tag Library. It is not necessary for JSP pages using the Struts-EL tag library to also use the Struts tags or the JSTL tags, but the Struts and JSTL tag libraries need to be part of the application utilizing the Struts-EL tag library. This is because the Struts-EL tag classes are all subclasses of Struts tag classes, and their implementation uses classes provided by the JSTL. -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:19 AM To: '[EMAIL PROTECTED]' Subject: JSTL in Struts. I wish to use JSTL taglib in my project (Struts 1.1b2). I have read on the mailing-list that latest versions of Struts contain Struts-EL. I understood that this Struts-EL is an implementation of JSTL. But it requires the nightly builds. It seems that Sun and Jakarta Taglibs also provide JSTL. To me, I could download one of them, install it manually into Struts 1.1b2 and go. My question: what's the difference between Struts-EL and Jakarta Taglib JSTL, for example? why should I use Struts-EL, instead of JSTL from other sources? ---cut here--- This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the
RE: JSTL in Struts.
The Struts-EL supports EL just like JSTL. But the Struts-EL project is all the Struts custom tags you're used to, less functionality covered by tags in the JSTL. In essence, it forces developers to use the JSTL for certain functionality instead of relying on the Struts tags. This how this would have been if the JSTL was developed before the Struts custom tags. But the JSTL came after Struts, resulting in duplicate functionality between the two tag libraries. Hence, using Struts-EL encourages the use of standard custom tags (i.e. JSTL) in lieu of the Struts tags, where possible. Here's some more info from the readme file in the Struts-EL project: Thank you very much for the cut/paste. I could not find this information on the site. My additionnal question is: JSTL from Jakarta/Sun requires Tomcat4 (because of Servlet/JSP versions). Does Struts-EL also requires Tomcat4? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL in Struts.
I believe Struts-EL (and any other EL tags) also require a servlet 2.3 container. David From: ROSSEL Olivier [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: JSTL in Struts. Date: Thu, 21 Nov 2002 15:40:29 +0100 The Struts-EL supports EL just like JSTL. But the Struts-EL project is all the Struts custom tags you're used to, less functionality covered by tags in the JSTL. In essence, it forces developers to use the JSTL for certain functionality instead of relying on the Struts tags. This how this would have been if the JSTL was developed before the Struts custom tags. But the JSTL came after Struts, resulting in duplicate functionality between the two tag libraries. Hence, using Struts-EL encourages the use of standard custom tags (i.e. JSTL) in lieu of the Struts tags, where possible. Here's some more info from the readme file in the Struts-EL project: Thank you very much for the cut/paste. I could not find this information on the site. My additionnal question is: JSTL from Jakarta/Sun requires Tomcat4 (because of Servlet/JSP versions). Does Struts-EL also requires Tomcat4? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSTL in Struts.
JSTL requires JSP 1.2 or higher. I don't use Tomcat, so I do know much about it. More specifically, I don't know if it has JSTL support built-in, or whether it still requires importing the JSTL reference implementation from Jakarta. I'm currently using the JSTL reference implementation (1.0.2), and the Struts-EL library with WebLogic 6.1. These work fine. Hence, these should work for you as long as your application server supports JSP 1.2 or higher. -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:40 AM To: 'Struts Users Mailing List' Subject: RE: JSTL in Struts. The Struts-EL supports EL just like JSTL. But the Struts-EL project is all the Struts custom tags you're used to, less functionality covered by tags in the JSTL. In essence, it forces developers to use the JSTL for certain functionality instead of relying on the Struts tags. This how this would have been if the JSTL was developed before the Struts custom tags. But the JSTL came after Struts, resulting in duplicate functionality between the two tag libraries. Hence, using Struts-EL encourages the use of standard custom tags (i.e. JSTL) in lieu of the Struts tags, where possible. Here's some more info from the readme file in the Struts-EL project: Thank you very much for the cut/paste. I could not find this information on the site. My additionnal question is: JSTL from Jakarta/Sun requires Tomcat4 (because of Servlet/JSP versions). Does Struts-EL also requires Tomcat4? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. -- 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]