I apologize in advance if this topic has come up before, but ...

I'm building a Struts JSP page containing a form.  I've noticed that the 
HTML tags typically do not require the specification of a "name" attribute 
in order to retrieve property values from a bean.  If the name isn't 
specified, the property value is retrieved from the bean associated with 
the form.  However, logic tags require the use of the name attribute in 
order to retrieve a property.  Isn't there some way that the logic tags 
could look to see if there is a bean "in scope" and use that bean to 
retrieve property values from if no name attribute is specified?  The 
problem I have is this, I have a portion of a form which is common to more 
than one form.  I would like to factor out the common stuff into an include 
file of some sort.  However, the common stuff makes use of a logic tag 
(notEqual).  I can't factor out this code because I have to explicitly 
reference a specific bean name in order for this code to work.  However, my 
various forms have different bean names associated with them.  It's not a 
terribly big deal, but it seems as if the name attribute shouldn't have to 
be required if some sort of "default" bean is available for the page.

Thanks.

Reply via email to