Author: bayard Date: Wed Feb 7 14:22:21 2007 New Revision: 504721 URL: http://svn.apache.org/viewvc?view=rev&rev=504721 Log: Applying the patch from STR-2996. I'm not a Tiles expert, but this seems like a simple one to me.
Modified: struts/struts1/trunk/tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java Modified: struts/struts1/trunk/tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java URL: http://svn.apache.org/viewvc/struts/struts1/trunk/tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java?view=diff&rev=504721&r1=504720&r2=504721 ============================================================================== --- struts/struts1/trunk/tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java (original) +++ struts/struts1/trunk/tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java Wed Feb 7 14:22:21 2007 @@ -161,13 +161,18 @@ { Object value = compContext.getAttribute(name); // Check if value exist and if we must send a runtime exception - if( value == null ) - if(!isErrorIgnored) { + if( value == null ) + { + if(!isErrorIgnored) + { throw new JspException ( "Error - tag importAttribute : property '"+ name + "' not found in context. Check tag syntax" ); + } + } + else + { + pageContext.setAttribute(name, value, scope); } - - pageContext.setAttribute(name, value, scope); } else { // set all attributes