The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
JSP Standard Tag Library Eases Webpage Development

1 reply on 1 page. Most recent reply: Mar 8, 2003 6:34 AM by Michael Strasser

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

JSP Standard Tag Library Eases Webpage Development Posted: Mar 7, 2003 8:28 AM
Reply to this message Reply
Advertisement
Steve Small writes, "With an expression language (EL) and a set of four powerful, easy-to-learn standard tag libraries, JSTL is likely to soon become the dominant approach for implementing dynamic, Java-based Websites."

http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html

Here's an excerpt of this JavaWorld article:

he 1996 introduction of Java servlets made Java a reasonable choice for dynamic Webpage development. The subsequent debut of JavaServer Pages (JSP) followed by the inclusion of support for JSP tags were logical evolutionary steps toward fast, maintainable Java Webpage implementation. But the mid-2002 release of JSTL (JSP Standard Tag Library) represents perhaps the biggest step yet in speeding and simplifying the development process further.

In this article, I explain JSTL's capabilities and cover everything you need to get started with JSTL. It's assumed you have a basic understanding of Java, JSP, XML, and setting up a Web container. If you're not comfortable with these topics, you might want to browse the background references in Resources. Additional assumed knowledge is described in the XML and SQL sections below.


What do you think of the article?


Michael Strasser

Posts: 2
Nickname: strasser
Registered: Mar, 2003

You don't need to edit web.xml and have separate TLDs Posted: Mar 8, 2003 6:34 AM
Reply to this message Reply
This article is another good introduction to JSTL and it will help spread the word. Now books are appearing as well, people will start to learn the tags and EL and use them a lot.

But Steve Small should have been more up-to-date in his installation instructions.

In JSP 1.2 multiple TLDs can be loaded from the /META-INF directory of any jar on the classpath. The JSTL TLDs are all in standard.jar in the Jakarta reference implementation.

That means you don't need to copy the TLD files to /WEB-INF (or anywhere else) and you don't need to edit web.xml to explicitly list the tag libraries and their URIs. All you need to do is to use the same URI as in the <uri> element in a TLD file to use that library. (The URIs for JSTL are part of the specification.)

You can of course do the same with any tag libraries you write yourself. It is really neat to be able to distribute some functionality that is all contained in a single jar without users needing to get other files and edit web.xml.

Seeing that JSTL requires JSP 1.2 the article should show the JSP 1.2 way of using TLDs instead of suggesting people still use the old (JSP 1.1) way.

(BTW, Resin can find TLDs in a /META-INF directory somewhere on the classpath. This is contrary to the JSP 1.2 spec, which states that the TLDs must be in a jar file.)

Flat View: This topic has 1 reply on 1 page
Topic: Drive Your Unit Tests with Custom Scripts Previous Topic   Next Topic Topic: Grid Job Submission Using the Java CoG Kit

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use