Thursday, February 7, 2008

Java Standard Tag Library (JSTL) Advantages

Java Standard Tag Library (JSTL) Advantages

JSTL, which stands for Java Server Pages Standard Tag Library, is a collection of custom JSP tag libraries that provide common Web development functionality. It was originally developed as the open source Apache Jakarta Taglib project but is now managed by the Java Community Process (JCP) under JSR-52 and Standard by Sun. JSTL's key goal was to remove the need for J2EE Web developers having to build their own proprietary tag libraries for common Web development processes.

The common Web development areas which JSTL covers include:

  • Conditionals
  • Iterations
  • Text formatting
  • Database access (SQL)
  • XML processing
  • Internationalization
  • Accessing URL resources

Problems With Scriptlet
Java Server Pages Provide a way to develop presentation layer by merging static HTML code and dynamic Java Code using script. It is best as compared servlet but programmers or web developers who work on presentation layer mix java code.

  1. Scriptlet code is not reusable--Scriptlet code appears in exactly one place: the JSP page that defines it.
  2. Scriptlets encourage copy/paste coding--Because scriptlet code appears in only one place, it is often copied to a new context.
  3. Custom tags centralize code in one place. When a tag handler class changes, the tag's behavior changes everywhere it is used.
  4. Scriptlets mix logic with presentation-. Scriptlets can easily confuse the intent of a JSP page by expressing program logic within the presentation.
  5. Scriptlets break developer role separation.
  6. Scriptlets make JSP pages difficult to read and to maintain
  7. Scriptlet compile errors can be difficult to interpret
  8. Scriptlet code is difficult to test

<% if

((User)session.getAttribute("user")).getName().equals("test") {
%>
<% }
%>



<>test =" $ { user.name = = 'test'
} " >

.......
<
/ c : i f >




JSP Standard Taglib
Library Advantages

1.
Standard Tag
Once standardized, JSTL will provide a rich layer of portable
functionality to JSP pages.
It is easy for developer to
understand other code easily. Before Jstl every made his propriety tag
which are different for
every one now its standard and easy
to understand for all. It also is mature and tested.

2.
Make Code Neat and Clean It makes the code neat and clean usually
scriplet confuse the developer due to mixing of java and html

code. it
makes clean the code

3
.Automatic JavaBeans Introspection Support Here is
little advantage to JSTL over JSP scriptlets. But if you consider that
JSTL's
expression language handles JavaBean introspection
automatically.

4.
Easier
for Humans to Read JTSL is based on XML, which is very similar to HTML.
Rather than spending a great deal of time learning
where to
put semicolons and how to construct code blocks, HTML programmers can
fall right into a programming language that is similar to
HTML


5.Easier for Computers
to Read It is also much easier for computers to read. Tools such as
FrontPage and Dream weaver
are generating more and more HTML
code. Although HTML generation tools do a great job of formatting HTML
code, they often
run into problems when this HTML code is
intermixed with JSP scriptlet code. Because JSTL is always expressed in
XML-compliant tags,
it will be easier for HTML generation
tools to parse the JSTL code that is contained within the document




The above
are basic benefits of jstl
.JSTL introduce new way of
development and have lots of benefits in bits and
bytes level
I discussed only bytes level benefits it not easy to cover bites level
in this discussion but it is enough
for
understanding.

11 comments:

Unknown said...

This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks,
Best JAVA Training in Chennai | JAVA Training |Java Training in chennai

Unknown said...

Great article. This is very useful. Thanks for sharing.

html training in chennai

Unique Articles said...

https://www.quester.pk/question/does-telenor-have-3g-coverage-in-daharki/
https://www.quester.pk/question/does-telenor-have-3g-coverage-in-daggar/
https://www.quester.pk/question/does-telenor-have-3g-coverage-in-dadu/
https://www.quester.pk/question/does-telenor-have-3g-coverage-in-chunian/
https://www.quester.pk/question/does-telenor-have-3g-coverage-in-chowk-sarwar-shaheed/

vignesjoseph said...

Everyone wants to get a unique place in the IT industry’s for that you need to upgrade your skills, your blog helps me improvise my skill set to get a good career, keep sharing your thoughts with us.
Software Testing Training in Chennai

Aparna said...

This is the awesome post and I have huge information from your creative blog. The admin presented the content is very interesting and also comprehensive. Thank you for your sharing, Keep updating...
Oracle Training in Chennai
Oracle Training institute in chennai
Pega Training in Chennai
Tableau Training in Chennai
Oracle DBA Training in Chennai
Primavera Training in Chennai
Unix Training in Chennai
Power BI Training in Chennai
Oracle Training in Chennai
Oracle Training institute in chennai

shiny said...

Great Explanation with lots of useful information about aws and great explanation in this blog.


sap training in chennai

sap training in annanagar

azure training in chennai

azure training in annanagar

cyber security course in chennai

cyber security course in annanagar

ethical hacking course in chennai

ethical hacking course in annanagar

deiva said...

This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks,

hadoop training in chennai

hadoop training in omr

salesforce training in chennai

salesforce training in omr

c and c plus plus course in chennai

c and c plus plus course in omr

machine learning training in chennai

machine learning training in omr

nayar said...



Awesome blog. Thanks for sharing such a worthy information....
Python Training in Bangalore
Python Classes in Pune
Python Training in Hyderabad

Reshma said...


Such a great blog.Thanks for sharing.........
Graphic Design Courses in Bangalore
Graphic Design Courses in Pune
Graphic Design Courses in Hyderabad
Graphic Design courses in Delhi
Graphic Design courses in Gurgaon

bruce wayne said...

Great blog.thanks for sharing such a useful information
best java institute in chennai

SHIVAM SHARMA said...

The strategy you have posted on this technology hepled me to get into the next level and had lot of informations in it. Python is one of the basic level programming and is very important one. python classes in pune