This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts tags or JSTL tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts tags or JSTL tags" Watch "Struts tags or JSTL tags" New topic

Struts tags or JSTL tags

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980

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

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.

Consultant, Sima Solutions
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
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?

I agree. Here's the link:
subject: Struts tags or JSTL tags
It's not a secret anymore!