Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts and JSTL

 
Neil Guinto
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used struts tag lib but no JSTL yet, I want to and liked to know how does this all fit right now in the overall Struts framework?
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Struts EL taglibs included in 1.1 was added to make it easy to use Struts with the JSTL. According to their development roadmap, "it is expected that Struts 2.0.x will rely on JSTL and the JavaServer Faces API as supporting technologies."
 
Payam Fard
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, there would be no overlap among Java Server Faces, JSTL and Struts. Is that right? How are they different from one another?
Thanks,
Payam.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Payam Fard:
So, there would be no overlap among Java Server Faces, JSTL and Struts. Is that right? How are they different from one another?

Check out this link, which should help answer your questions.
 
David Geary
Author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Payam Fard:
So, there would be no overlap among Java Server Faces, JSTL and Struts. Is that right? How are they different from one another?
Thanks,
Payam.

There's plenty of overlap between JavaServer Faces (JSF) and Struts and between JSTL and Struts (but not between JSF and JSTL).
Many of the JSTL tags were inspired by Struts tags. You can essentially think of the JSTL tags as (arguably) better versions of some of the Struts tags. In fact, many of the Struts tags will be deprecated in favor of JSTL tags.
Much of JSF is also inspired by Struts. Essentially, JSF is a better version of Struts (or at least it will be--those of us on the JSF expert group realize the current EA has issues and we're addressing them) with a server-side component model somewhat like the Swing component model.
You can also use JSF components with Struts via a tag library implemented by Craig McClanahan. That way, if you're a Struts die-hard, you can stick with Struts instead of switching to JSF, but still take advantage of all the cool JSF components (like trees, calendars, etc) that are being developed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic