Bugs item #994355, was opened at 2004-07-20 08:11
Message generated for change (Comment added) made by wglass
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=994355&group_id=73068
Category: main tag library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alejandro Velasco (avelasco)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error: mediaType is already defined
Initial Comment:
Hi:
A Struts application correctly working over Tomcat 5.0,
throws this error when trying to run it on Sun Web App
Server 6.1, or Sun App Server 7.0.
------ ERROR ---
WEB4000: Unable to compile class for JSPWEB4124:
An error occurred at line: 32 in the JSP file: /jsp/niv4.jsp
WEB4126: Generated servlet error:
===SERVER===\_jsps\_jsp\_niv4_jsp.java:418:
mediaType is already defined in _jspService
(javax.servlet.http.HttpServletRequest,javax.servlet.http
.HttpServletResponse)
org.displaytag.properties.MediaTypeEnum mediaType =
null;
--------- FOLLOWS VERY LONG STACK REMOVED -----
Reading users-mailing list I think it can be a bug trying
to repair another one that claimed mediaType was not
declared.
What can be the difference between behaviours of
Tomcat and Sun WebServer?
I'm using displaytag-1.0-rc1, but with displaytag-1.0-
b3.jar the behaviour is the same.
Thanks
Alejandro
----------------------------------------------------------------------
Comment By: Will Glass-Husain (wglass)
Date: 2004-08-24 14:36
Message:
Logged In: YES
user_id=643158
Here's a brief discussion about this in the MyEclipse forum:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-
2568.html
----------------------------------------------------------------------
Comment By: Will Glass-Husain (wglass)
Date: 2004-08-23 21:09
Message:
Logged In: YES
user_id=643158
Hi,
I'm having a similar problem. When I use MyEclipse v3.8b1
(an add-on to Eclipse that adds JSP capability), it
reports "Duplicate Local variable mediaType" for a nested
<display:table> tag.
I believe this is because TableTagExtraInfo defines a variable
named mediaType:
// media type row number
variables.add(new VariableInfo(
TableTag.PAGE_ATTRIBUTE_MEDIA,
"org.displaytag.properties.MediaTypeEnum",
true,
VariableInfo.NESTED));
When two tables are nested, depending on the JSP compiler
implementation, there may be a name conflict between the
mediaType variable for the outer and inner table. Tomcat 5
appears to handle this acceptable. MyEclipse (and
presumably Sun WebServer) give an error.
I'm not an expert here, but I think some type of unique ID
needs to be attached to the variable to make nested tags
work in all circumstances. Perhaps this could even be
eliminated (I don't understand what useful purpose it has).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=994355&group_id=73068
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel