VisualBuilder
  Home > Jsp > Tutorials > Introduction to Tag libraries - JSP Tutorial
Tell a friend
Link to us
Total Members
      Members: 84661
     
Sitemap Forum Chat
Home
JSP Tutorial Home
1 . Introduction to JSP
2 . Why use JSP?
3 . JSP compared to ASP,ASP.NET and Servlets
4 . JSP architecture
5 . Setting up the JSP environment
6 . Creating your first JSP page
7 . Using JSP tags
8 . Declaration tag
9 . Expression tag
10 . Directive tag
11 . Scriptlet tag
12 . Action tag
13 . Creating your second JSP page
14 . Implicit Objects
15 . Creating a Form
16 . Processing a Form
17 . Creating a Form (more elements)
18 . Processing a Form (more elements)
19 . Processing a Form (more elements)
20 . Getting Client Info
21 . Review and next steps
22 . Beans scopes in JSP
23 . JSP Bean scope examples
24 . Uploading Application in JSP.
25 . Modularization in JSP
26 . Exception Handling in JSP-1
27 . Exception Handling in JSP-2
28 . Session Tracking in JSP
29 . Security in JSP -2
30 . Security in JSP -1
31 . Internationalization in JSP application
32 . Introduction To Expression Language.
33 . Introduction to Tag libraries
34 . Introduction To Core Taglib -1
35 . Introduction To Core Taglib -2
36 . Function Taglib
37 . Database Handling in JSP.
38 . Creating User Defined Custom Tag -1
39 . Creating User Defined Custom Tag -2
40 . Best Practices in JSP
 
 
JSP Home
JSP Members (18705)
JSP Member Articles ( 11 )
JSP Discussion (71)
JSP Q & A ( 81 )
- JSP Ask Question
- JSP Questions
- JSP Unanswered Questions
JSP Resources
JSP Source Code (172)
JSP Articles (34)
JSP Blogs (330)
JSP Jobs (0)
JSP Components (10)
JSP Books (372)
JSP Websites (13)
JSP News (12)
 
GROUPS
.NET
ASP.NET
.NET
C#
ASP
Visual Basic
Java
Java
JSP
EJB
Other
Delphi
C++
Ajax
UML
JavaScript
PHP
Web Design
Web Hosting
SQL Server
Oracle
Project Management
More Groups

 
LEARNING CENTER
TUTORIALS
.NET
.NET Tutorial
ASP Tutorial
ASP.NET Database Tutorial
ASP.Net Security,Internationalisation And Deployment
ASP.NET Tutorial
C# Tutorial
Web Development
Flex Tutorial
HTML Tutorial
Learn AJAX Tutorial
PHP Tutorial
Software Development
Database Tutorial
SQL Tutorial
UML Tutorial
Java
Ant Tutorial
EJB 3 Tutorial
Hibernate Tutorial
Java Tutorial
Java Web Component Tutorial
Java XML Tutorial
JDBC Tutorial
JDK1.5 Tutorial
JSF Tutorial
JSP And J2EE Design Tutorial
JSP Tutorial
Spring Tutorial
Struts Tutorial

RESOURCES
Q & A (451 )
Source Code (3275 )
Articles (359 )
Books (372 )
Components (1596 )
News (892 )
Websites (1207 )

SUBMISSIONS
Submit Article
Submit Website
Submit News
Submit Source Code
Submit Component

COMMUNITY
Members Directory
Discussion Forum
Chat

SITE
About Us
Sitemap
Search
Contact Us
Link To Us
Feedback
Tell a Friend
Partners
Advertise

Jsp Tutorial
 Introduction to Tag libraries
  << Prev: Introduction To Expression Language. Next: Introduction To Core Taglib -1 >>

JSTL is a component technology within the Java 2 Enterprise Edition (J2EE) specification and is controlled by Sun Microsystems. JSTL is nothing more than a set of simple and standard tag libraries that encapsulates the core functionality commonly needed when writing dynamic JSP pages. The following are the problems with the JSPs:-



  1. Java code embedded within scriptlet tags is ugly and obtrusive.

  2. It is very difficult to modify the java code embedded in the JSP files if the file is large.

  3. Java code within JSP scriptlets cannot be reused by other JSP pages.

  4. Retrieving objects out of the HTTP request and session is cumbersome and type casting to the object's class is required.


The JSTL tags are basically categorized into four libraries:



  • core:- Basic scripting functions such as loops, conditionals, and input/output.

  • fmt:- Internationalization and formatting of values such as currency and dates.

  • xml:- XML processing

  • sql:- Database access.


Advantages of using JSTL:-



  • JSTL tags are XML based tags which are cleanly and uniformly blend into a page's HTML markup tags.

  • The four JSTL tag libraries include most functionality that would be needed in a JSP page. JSTL tags are easier for non-programmers and inexperienced programmers, because they do not require any knowledge of Java programming.

  • JSTL tags encapsulate reusable logic such as formatting dates and numbers.

  • JSTL tags can reference objects in the request and session without knowing the object's type and no casting is required.

  • JSP's EL (Expression Language) makes it easy to call getter and setter methods on Java objects. This is not possible in JSP 1.2, but became available in JSP 2.0. EL is used extensively in JSTL.


JSTL Drawbacks:



  • JSTL can add processing overhead to the server. Both Java scriptlet code and tag libraries are compiled into a resulting servlet, which is then executed by the servlet container. Java code embedded in scriptlet tags is directly copied into the resulting servlet. But JSTL tags add more than required code to the servlet.

  • Although JSTL provides a powerful set of reusable libraries, it cannot do everything that Java code can do. It is designed to facilitate scripting the presentation code that is typically found in the view tier of Model-View-Controller applications.


  << Prev: Introduction To Expression Language. Next: Introduction To Core Taglib -1 >>
Jsp Tutorial Home
Give feedback and win a prize.

 
   Printer Friendly
   Email to a friend
   Add to my Favourites    
  Download PDF version
   Report Bad Submissions
   Submit Feedback
 
  Delicious   Digg   Technorati   Blink   Furl   Reddit   Newsvine   Google Click each image to add
this page to each site.
 
 
Welcome Guest Signup
MEMBER'S PANEL
EMAIL
PASSWORD
Forgot your password?
New User? Click Here!
 
Resend Activation Email!
 
SEARCH
 
 
 
ADVERTISEMENT
Partner List
Code Project
ASP Alliance
More
 
 
 
 

Home | Login | About Us | Contact Us | Privacy Policy | Advertising