diff -Nru struts-orig/src/share/org/apache/struts/taglib/bean/DefineTag.java jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java
--- struts-orig/src/share/org/apache/struts/taglib/bean/DefineTag.java	Fri Feb 22 02:21:18 2002
+++ jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java	Sun Feb 24 09:29:04 2002
@@ -196,21 +196,35 @@
     // --------------------------------------------------------- Public Methods
 
     /**
+     *
+     * Check if we need to evaluate the body of the tag
+     *
+     * @exception JspException if a JSP exception has occurred
+     */
+    public int doStartTag() throws JspException {
+    	
+        if( this.name!=null )
+            return (SKIP_BODY);
+        else
+            return (EVAL_BODY_BUFFERED);
+    }
+    
+    /**
      * Retrieve the required property and expose it as a scripting variable.
      *
      * @exception JspException if a JSP exception has occurred
      */
     public int doEndTag() throws JspException {
 
-        if( this.value!=null && bodyContent!=null )
+        if( this.value!=null && bodyContent!=null && this.name!=null )
                 throw new JspException( messages.getMessage("define.value", name) );
 
         // Retrieve the required property value
         Object value = this.value;
+        if (value == null && name != null) 
+            value = RequestUtils.lookup(pageContext, name, property, scope);
         if (value == null) 
             value = bodyContent.getString();
-        if (value == null) 
-            value = RequestUtils.lookup(pageContext, name, property, scope);
 
         // Expose this value as a scripting variable
         int inScope = PageContext.PAGE_SCOPE;

