WebLogic s JSP Tag Library

WebLogic's JSP Tag Library

WebLogic Server provides a custom tag library called weblogic-tags.jar. This custom tag library is located in the %BEA_HOME%\weblogic700\server\ext directory.

The custom tag library of WebLogic provides the following tags:

  • <wl:cache></wl:cache> The wl signifies that this tag belongs to the tag library provided by the WebLogic Server. The <wl:cache> tag allows caching of the body content present within the tags. Two types of caching are supported by the <wl:cache>, input caching and output caching. Output caching is used to cache the output generated in the body content between the tags. Input caching is the preserving of the values set by the body content of the <wl:cache> tag.

  • <wl:process></wl:process> The <wl:process> tag is used to change the processing flow in the body content enclosed by these tags. The processing flow is controlled using the attributes name, notname, value, and notvalue.

  • <wl:repeat> The <wl:repeat> custom tag provided in WebLogic's custom library is useful to iterate multiple data, as in a collection, a vector of objects, or even a result set. The <wl:repeat></wl:repeat> tags take the following attributes: set, count, id, and type.

WebLogic's custom tag library can be included to be used in your JSPs by copying the weblogic-tags.jar file in the lib directory of your domain. No extra deployment is required for this tag library.

Form Validation

Apart from the preceding tags in WebLogic's custom tag library, there is another special custom tag library devoted to processing HTML forms in the JSP. This custom library file, named weblogic-vtags.jar, is located in the same %BEA_HOME%\weblogic700\server\ext directory.

To use this file, you need to copy this .jar file to the lib directory of your domain. The following tags are supported in this custom library for processing HTML forms:

  • <wl:summary></wl:summary> The overall enclosing tags for the <wl:form> and <wl:validator> tags. The <wl:summary> tag is the root tag of the tags used to perform validation in the JSP.

  • <wl:form></wl:form> Defines an HTML form in the JSP. The <wl:form> tag takes three attributes: method, action, and name.

  • <wl:validator></wl:validator> Performs validation for each field in the HTML form. The <wl:validator> custom tag takes the following attributes: errorMessage, expression, fieldToValidate, and validatorClass, which contain the name of the tag handler class invoked to execute the custom tag.

The tag handler classes (located in weblogic-vtags.jar) supporting these tags are

  • weblogicx.jsp.tags.validators.RequiredFieldValidator class

  • weblogicx.jsp.tags.validators.RegExpValidator class

  • weblogicx.jsp.tags.validators.CompareValidator class

You can write your own validation functionality in your custom tag handler as a custom validator class.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net