This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
* I place the struts-layout.tld within my WEB-INF directory and I place the struts-layout.jar file in the WEB-INF/lib directory.
* I modified the web.xml file to register the tld file.
* I created a sample jsp that I could create a simple collection object and then iterate thru the collection using the layout:collection tag.
* The jsp includes: <%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %> <% List list = new ArrayList(); Program p = new Program(); p.setName("Item One"); p.setProgramId(new Integer(1)); list.add(p); Program p2 = new Program(); p.setName("Item Two"); p2.setProgramId(new Integer(2)); list.add(p2); Program p3 = new Program(); p3.setName("Item Three"); p3.setProgramId(new Integer(3)); list.add(p3); Program p4 = new Program(); p4.setName("Item Four"); p4.setProgramId(new Integer(4)); list.add(p4); pageContext.setAttribute("programList", list);
But, all this work doesn't matter because I get an error stating:
Error in using tag library uri='/WEB-INF/struts-layout.tld' prefix='layout': The Tag class 'fr.improve.struts.taglib.layout.field.SuggestFieldTag' has no setter method corresponding to TLD declared attribute 'editType', (JSP 1.1 spec, 5.4.1)
I noticed in the Change report that someone corrected this problem. Then why am I still getting the error?
Anyone else having this problem?
Joined: Apr 30, 2002
I sent a message to someone within the Struts Layout group and they removed the attributes related to the tag in question. As a result, the problem with the tag is not longer an issue. The next problem is that the collectionItem tag needed to have four attributes removed: span, subtitle, subtitleArg0, and subtitleArg1. I removed those attributes and then got a 500 Error stating that there is a missing class: com/fgm/web/menu/MenuComponent.
As a result, I tried to create my own Struts-Layout.jar file hoping that I can locate the missing java file. As I'm compiling the java files, I see that I'm also missing a "MenuRepository" and "MenuAction" java file. Does anyone have any idea how I can locate those files?
Is everyone having these types of problems?
~Chris [ March 10, 2005: Message edited by: chris lyles ]
For those of you still having this problem... I didn't find many posts on the topic that helped me so I'm posting my solution here. My environment is weblogic 8 with struts-layout 1.3
In my case, I got the following error:
fr.improve.struts.taglib.layout.datagrid.DatagridTextTag' has no setter method corresponding to TLD declared attribute 'mode'
The problem was there is no attribute 'mode' in the DatagridTextTag class. I went into struts-layout.tld, found the section for "DatagridTextTag" and just deleted the small section referencing 'mode'. The solution of deleting non-existent attributes also works for previous versions of struts-layout. Version 1.2 TLD also includes one or more attributes inside a tag which that attribute doesn't exist. You only have to delete the attribute from the tag class the error message references.
Some app servers (such as tomcat and even weblogic 9) ignore the problem until you actually try to reference the attribute from your app.
Good luck! [ August 13, 2008: Message edited by: D Crosscup ]