Java
  Home arrow Java arrow Page 5 - The JSP Files (part 8): Tagged And Bag...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

The JSP Files (part 8): Tagged And Bagged
By: Vikram Vaswani and Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2001-06-11

    Table of Contents:
  • The JSP Files (part 8): Tagged And Bagged
  • Playing Tag
  • Looking Inside
  • Meeting Popeye
  • You've Got Mail!
  • Applet Antics

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    The JSP Files (part 8): Tagged And Bagged - You've Got Mail!


    (Page 5 of 6 )

    Now, our original thesis was that tag libraries would allow Web designers with no knowledge of JSP to implement complex functionality on a Web page. While the examples you've just seen were simple and illustrative, they haven't really proved that thesis - after all, it's reasonable to suppose that any competent Web designer would know how to manipulate date and time values via JavaScript and wouldn't really require a tag library for the purpose. So let's try something most client-side specialists wouldn't know how to handle - email delivery.

    Typically, the process of generating email from a Web site is handled via a server-side script - Perl gurus open a pipe to sendmail, while PHP programmers reach for the mail() function. This implies a foreknowledge of either PHP or Perl - not something a novice Web designer may be expected to possess. What solution does JSP offer this poor soul?

    The Jakarta MAILER library.

    Using a couple of simple tags from this library, any Web developer can quickly add mail-processing capability to a Web page - in fact, the process is simpler than the equivalent techniques in Perl and PHP. Take a look.

    <html> <head> </head> <body> <%@ taglib uri="jspmailer" prefix="jmail" %> <jmail:mail server="mail.server.com" to="recipient@server.com" from="sender@server.com" subject="This stuff is pretty cool!"> <jmail:message> OK, you've convinced me - this tag library thing is awesome! Where do I sign up? </jmail:message> <jmail:send/> </jmail:mail> </body> </html>
    By simplifying otherwise complex code, custom tag libraries like the one above can promote both efficiency and harmony in group development projects, by allowing the developers to concentrate on building better tools (libraries) and the designers to concentrate on presentation (rather than code). As JSP evolves, you can expect tag libraries to grow in importance - even now, they are by far one of the most compelling reasons to choose this server-side language over others.

    More Java Articles
    More By Vikram Vaswani and Harish Kamath, (c) Melonfire


     

       

    JAVA ARTICLES

    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...
    - Java Operators
    - Primitive Data Types and Basic Language Rule...
    - Java and Object-Oriented Programming
    - Java Beginning Programming
    - Gaming Development Setup





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway