Date Tag

Steps - Basic Tag

  1. Create deployment descriptor. Path
  2. Create tag class. Path Note
  3. Compile tag class
  4. Add tag element to deployment descriptor.
  5. Create jsp page that uses our tag lib.
  6. Run UseDate.jsp

Steps - Add "format" Attribute

  1. Update deployment descriptor.
  2. Add "setter" method to tag class.
  3. Update UseDate.jsp.
  4. Run it

Final Source

  • Source: UseDate.jsp
  • Source: /WEB-INF/taglib.tld
  • Source: smartsoft/tutorial/tags/DateTag.java
  • Run It

  • UseDate.jsp