• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

type ForTokensTag is not applicable for the arguments (Object)

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
I'm trying to display a kind of preview for a text. But on JBoss 4.2.2 I take the following error.

javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/home.jsp': Unable to compile class for JSP:

An error occurred at line: 54 in the jsp file: /WEB-INF/jsp/home.jsp
The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)
51: <% // FocusOn - description%>
52:
53:
54: <c:forTokens var="token" items="${entry.description}" delims=" " end="200">
55: <cut value="${token}"/>
56: </c:forTokens>
57: ...


Stacktrace:
at org.apache.struts.taglib.logic.ForwardTag.doForward(ForwardTag.java:125)


The property's bean which I'm trying to access is a String type.


The code above is nested to this tag belowe




This comes out from the entity called during the iteration


What's the problem then??
Thanks in advance
[ August 11, 2008: Message edited by: Alessandro Ilardo ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the bean have a description property accessor that gives access to the member variable?
 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course



But the error doesn't say that cannot find that property, instead it says that the property is not a String.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alessandro Ilardo:
Of course
Of course? If you don't give us the details, we can;t guess.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic