Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jstl vs struts tag library  RSS feed

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • 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
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, JSTL is my best bet.
[ March 16, 2005: Message edited by: Adeel Ansari ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • 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...).
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why use proprietary tags when standardized technology exists? JSTL, hands down.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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 <cut> in the value attribute.
 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • 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
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!