JavaServer Page

January 30, 2007

Adding assertions and input validation B Gets a

Filed under: JSP Tag Libraries — webmaster @ 4:35 pm

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> 1.0 1.1 assert http://www.manning.com/jsptagsbook/assert-taglib A tag library for the assert tag assert book.assert.AssertTag book.assert.AssertExtraInfo empty Asserts based on a set of conditions parameter true false handler true false type false false

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting