• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Layout tag TLD error

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've downloaded serveral struts-layout zip files from http://struts.application-servers.com/

* 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);

%>

<layout:row>
<layout:column>
<layout:collection name="programList" styleClass="row1" styleClass2="row2">
<layout:collectionItem title="Program Name" property="name"/>
<layout:collectionItem title="Program Id" property="programId"/>
</layout:collection>
</layout:column>
</layout:row>

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?

Thanks.
 
clyles
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
clyles,

Please check your private messages for a message regarding an important administrative matter. You can do so by clicking My Private Messages in the upper right corner of the page.
 
reply
    Bookmark Topic Watch Topic
  • New Topic