- This topic has 4 replies, 4 voices, and was last updated 20 years, 11 months ago by
Will Glass-Husain.
-
AuthorPosts
-
simplebestMemberI try to import a jbuilder9 project but some jsp files are not compiled. the problems is “Duplicate local variable mediaType” which I’ve never met in jbuilder, these jsp were normally running in tomcat and weblogic.
I use nested table of displaytag, the codes like this:
<display:column title=”sth”>
<display:table list=”<%=(ArrayList)al %>” id=”child” class=”childclass” >
…..can you give me answers? thank you !
June 9, 2004 at 11:24 am #208245
Riyad KallaMember1) Find the page where you are getting the error
2) Find in the page where mediaType is defined (either by a scriplet, jsp:useBean or struts bean:define)
2.5) Search for multiple occurances
3) Look at the page to see if you have any include statements
4) Check the included files to see if they define the same variableAugust 23, 2004 at 3:44 pm #213102Hi,
Did you ever solve this? I’m having the same problem with nested tables using the DisplayTag library. There aren’t any includes in my page, just the nested <display:table>.
WILL
August 24, 2004 at 7:03 am #213168
Scott AndersonParticipantCan you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.
August 24, 2004 at 9:34 am #213234Hi,
I’ve posted a bug report in the DisplayTag issue tracker on this.
http://sourceforge.net/tracker/index.php?func=detail&aid=994355&group_id=73068&atid=536613The issue is that mediaType is defined as a variable in the tag library. When <display:table> is nested, some JSPcc implementations appear to use the same scope, others not. Hence MyEclipse reports this as an error, but the page works fine in Tomcat 5. (I assume MyEclipse uses a different JSP compiler than Tomcat?)
Commenting out this line in the tag library and recompiling removed the error. (possibly removing tag functionality, I’m not sure).
TableTagExtraInfo.java
(note that PAGE_ATTRIBUTE_MEDIA = “mediaType”)// media type row number
variables.add(new VariableInfo(
TableTag.PAGE_ATTRIBUTE_MEDIA,
“org.displaytag.properties.MediaTypeEnum”,
true,
VariableInfo.NESTED));It’s not clear to me whether this is a JSP problem or a tag problem. (e.g. should JSP compilations allow nested tags with the same local variable?).
Requested info:
Eclipse 3.0.0
MyEclipse 3.7.2700
Installed from an installer, loaded a week or two ago
JDK 1.4.2_04 (eclipse & Tomcat)
Tomcat 5.0.27
Other plugins:
subclipse
maven -
AuthorPosts