Adding assertions and input validation B Gets a
Adding assertions and input validation B Gets a condition value and validates it using the appropriate assertion object Note how easy it is to implement AssertExtraInfo. All of the actual validation work is performed by isValidCondition(), so that all AssertExtraInfo needs to do is fetch the condition values from TagData and use the appropriate assertion object to validate it. Creating the TLD The last item to discuss before using AssertTag is its TLD entry (listing 7.20). Listing 7.20 Tag library descriptor for AssertTag < ?xml version="1.0" encoding="ISO-8859-1" ?> < !DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd>
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services