Water Implementation
Below is the Water code to implement the task of defining a function and calling it from HTML.
<defmethod new_tag message="message not available"> message </defmethod> <HTML> <new_tag message="This is a tag with an attribute"/> </HTML>
Creating a custom tag in JSP is the equivalent to defining a new object or method in Water. The defmethod defines a new method, new_tag, with a single parameter message. The default value of the parameter is "message not available". The method returns the value of the message argument passed into the method. The method returns the value of message because a Water method returns the value of the last expression.