Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Maxim Mossienko
Subsystem
J2EE.JSP
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Taras Tielkes
    5 years ago (29 Nov 2006 20:05)
  • Updated by   root
    2 years ago (17 Jan 2010 20:38)
  • Jira: IDEADEV-12353
    (history, comments)
 
IDEA-35700 Good code red: using <jsp:attribute> to set a dynamic attribute
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
2 Attachments
attach1.txt   (251 B) attach2.txt   (681 B)
There are basically three ways to use <jsp:attribute>:
1) in concert with <jsp:element>, to dynamically build content
2) as a way to specify (declared) attribute values for custom tags
3) to set dynamic attributes

This last option (3) is not recognized by the JSP editor (as of 5.1.2 and 6.0.2).

Relevant quote from the JSP 2.0 spec, section 5.10:

...
The behavior of the <jsp:attribute> standard action varies depending on the type of attribute being specified, as follows:
...
If the custom action accepts dynamic attributes (Section JSP.7.1.8), and the name of the attribute is not one explicitly indicated for the tag, then the container will evaluate the body of <jsp:attribute> and assign the computed value to the attribute using the dynamic attribute machinery. Since the type of the attribute is unknown and the body of <jsp:attribute> evaluates to a String, the container must pass in an instance of String.
...

To summarize:
  • if <jsp:attribute> is used to set a custom action attribute that is *not declared*, the editor should accept this *if the custom action supports dynamic attributes*.


Issue was resolved
Comments (2)
 
History
 
Linked Issues (?)
 
Chris Kimpton
  Chris Kimpton
29 Nov 2006 21:03
5 years ago
Sample jsp file snippet using jsp:attribute
Chris Kimpton
  Chris Kimpton
29 Nov 2006 21:03
5 years ago
Snipped of the related tag file to attachement 1