This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts tags or JSTL tags

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Which among these 2 is widely used..and which is better of the two..?

Regards
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The general consensus seems to be this:

In a case where a JSTL tag and a Struts tag can both perform the same task, the JSTL tag is preferred.

Why? JSTL is the standard for all Java EE applications and EL expressions are now part of the JSP specification. Because they are more standard and more part of mainstream Java EE, they are preferred. Besides that, especially in the case of conditional execution (c:if, c:choose, etc.) they are much more flexible and powerful than the struts <logic:xxx> tags.

Obviously,though, there are many Struts tags that do not have a JSTL equivalent such as the <html:xxx> tags. Naturally these tags will be used extensively in a Struts application.

If you use the search function on this forum, you will see several other threads which generally agree with my position.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merrill!!!

In our applications...we made use of normal html tags(form,input,etc)..and
jstl tags in our jsp...

We didnt use the struts tags....I believe even this approach is fine...

Also Struts tags are for fetch -only..

What do you say?

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic