- java.lang.Object
-
- javax.servlet.jsp.tagext.ValidationMessage
-
public class ValidationMessage extends Object
A validation message from either TagLibraryValidator or TagExtraInfo.As of JSP 2.0, a JSP container must support a jsp:id attribute to provide higher quality validation errors. The container will track the JSP pages as passed to the container, and will assign to each element a unique "id", which is passed as the value of the jsp:id attribute. Each XML element in the XML view available will be extended with this attribute. The TagLibraryValidator can then use the attribute in one or more ValidationMessage objects. The container then, in turn, can use these values to provide more precise information on the location of an error.
The actual prefix of the
id
attribute may or may not bejsp
but it will always map to the namespacehttp://java.sun.com/JSP/Page
. A TagLibraryValidator implementation must rely on the uri, not the prefix, of theid
attribute.
-
-
Constructor Summary
Constructors Constructor and Description ValidationMessage(String id, String message)
Create a ValidationMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description String
getId()
Get the jsp:id.String
getMessage()
Get the localized validation message.
-
-
-
Constructor Detail
-
ValidationMessage
public ValidationMessage(String id, String message)
Create a ValidationMessage. The message String should be non-null. The value of id may be null, if the message is not specific to any XML element, or if no jsp:id attributes were passed on. If non-null, the value of id must be the value of a jsp:id attribute for the PageData passed into the validate() method.- Parameters:
id
- Either null, or the value of a jsp:id attribute.message
- A localized validation message.
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/servlet/jsp/tagext/ValidationMessage.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.