1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package javax.servlet.jsp.tagext; 18 19 import javax.servlet.jsp.JspException; 20 21 /** 22 * For a tag to declare that it accepts dynamic attributes, it must implement 23 * this interface. The entry for the tag in the Tag Library Descriptor must 24 * also be configured to indicate dynamic attributes are accepted. 25 * <br> 26 * For any attribute that is not declared in the Tag Library Descriptor for 27 * this tag, instead of getting an error at translation time, the 28 * <code>setDynamicAttribute()</code> method is called, with the name and 29 * value of the attribute. It is the responsibility of the tag to 30 * remember the names and values of the dynamic attributes. 31 * 32 * @since 2.0 33 */ 34 public interface DynamicAttributes { 35 36 /** 37 * Called when a tag declared to accept dynamic attributes is passed 38 * an attribute that is not declared in the Tag Library Descriptor. 39 * 40 * @param uri the namespace of the attribute, or null if in the default 41 * namespace. 42 * @param localName the name of the attribute being set. 43 * @param value the value of the attribute 44 * @throws JspException if the tag handler wishes to 45 * signal that it does not accept the given attribute. The 46 * container must not call doStartTag() or doTag() for this tag. 47 */ 48 public void setDynamicAttribute( 49 String uri, String localName, Object value ) 50 throws JspException; 51 52 }