• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jstl vs struts tag library

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am not sure if I should use jstl or struts tag library. I can understand using the struts html tag lib when rendering a form but as for the other tags libs (logic, bean) would I be better of using jstl?

Thank you
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, JSTL is my best bet.
[ March 16, 2005: Message edited by: Adeel Ansari ]
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seeing as JSTL is a confirmed standard and doesn't tie you to Struts (always a good thing, especially for a registered Struts hater ) JSTL is to be preferred for everything (and that includes the form...).
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why use proprietary tags when standardized technology exists? JSTL, hands down.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whenever you have a situation where more than one language or more than one language construct can accomplish the same thing, the determining factor as to which one to use is "which one communicates better to the person trying to maintain this code?"

That answer can be different for different situations.

If I were an architect deciding on a direction for my group, or a "one-man band" able to do anything I choose, I'd say a choice of jstl tags would be a good choice.

If I'm working in a shop where everybody knows struts, and all the previous code uses struts tags, I'd continue to use struts tags, because in this situation, they communicate better.

In any case the I find the struts <html:xxx> tags more convenient because they automatically pull in the value from existing data, rather than having to code a scriptlet or a <c:out> in the value attribute.
 
Ranch Hand
Posts: 120
IntelliJ IDE Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They don't support any encodings except latin based. I wrote my own tags only because neither struts nor JSTL support russian characters. They claim to be multi langual but once it comes to the point both of them don't really work

[Bear: edited for language]
[ March 16, 2005: Message edited by: Bear Bibeault ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSTL doesn't say anything about encoding. If there's no JSTL implementation that supports Russian don't blame Sun, blame Russian programmers for never making one.
Maybe see this as an incentive to implement a JSTL library that does support Russian...
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I would advice you to use and combine Struts and JSTL.
You can combine them nicely when you use the Struts el extension of Struts for the html rendering and JSTL core as a "replacement" for Struts logic.
You can find a large amount of examples on the net and this combination will certainly speed up your development process.

Note however that when you start using Struts extensively and would like to use a presentation framework like SiteMesh, as a replacement for Struts Tiles. You could run into troubles when you combine Struts and JSTL, simply because SiteMesh contains some well known bugs when this combination is used.
 
Stan Sokolov
Ranch Hand
Posts: 120
IntelliJ IDE Hibernate Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeroen Wenting:
JSTL doesn't say anything about encoding. If there's no JSTL implementation that supports Russian don't blame Sun, blame Russian programmers for never making one.
Maybe see this as an incentive to implement a JSTL library that does support Russian...



Probably you are right. This is not a big deal to create set of tags that render graphic controls but this is a problem to support this library long enough because definitly developing of this library won't do any profit for the developer. I actually don't really like all this idea of distributing any open source libraries like Struts or JSTL for free. Hope, russian developer have something to do except writing free libs.
 
Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic